Hallo, ich weiss, dass dieser Code unvollständig ist. Mein Problem:Wenn man auf den Button 'Alt Gr' klickt, passiert nicht das was passieren soll. Gestern hat aber noch alles funktioniert. Kann mir jemand helfen???HTML-Code:<form name="Keyboard" id="Keyboard"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td bgcolor="#C0C0C0"> <input class="display" name="Display" size="60" /> </td> </tr> <tr> <td> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td> <input class="input" type="button" value=" 1 " onclick="add('1')" id="eins" /> </td> <td> <input class="input" type="button" value=" 2 " onclick="add('2')" id="zwei" /> </td> <td> <input class="input" type="button" value=" 3 " onclick="add('3')" id="drei" /> </td> <td> <input class="input" type="button" value=" 4 " onclick="add('4')" id="vier" /> </td> <td> <input class="input" type="button" value=" 5 " onclick="add('5')" id="fuenf" /> </td> <td> <input class="input" type="button" value=" 6 " onclick="add('6')" id="sechs" /> </td> <td> <input class="input" type="button" value=" 7 " onclick="add('7')" id="sieben" /> </td> <td> <input class="input" type="button" value=" 8 " onclick="add('8')" id="acht" /> </td> <td> <input class="input" type="button" value=" 9 " onclick="add('9')" id="neun" /> </td> <td> <input class="input" type="button" value=" 0 " onclick="add('0')" id="null" /> </td> <td> <input class="input" type="button" value=" ß " onclick="add('ß')" id="fragez" /> </td> <td> <input class="input_r" type="button" value=" <--- " onclick="backspace()" /> </td> <td> <input class="input_r" type="reset" value=" RESET " /> </td> </tr> </table> </td> </tr> <tr> <td> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="11"> </td> <td> <input class="input" type="button" value=" Q " onclick="add('Q')" id="q" /> </td> <td> <input class="input" type="button" value=" W " onclick="add('W')" id="w" /> </td> <td> <input class="input" type="button" value=" E " onclick="add('E')" id="e" /> </td> <td> <input class="input" type="button" value=" R " onclick="add('R')" id="r" /> </td> <td> <input class="input" type="button" value=" T " onclick="add('T')" id="t" /> </td> <td> <input class="input" type="button" value=" Z " onclick="add('Z')" id="z" /> </td> <td> <input class="input" type="button" value=" U " onclick="add('U')" id="u" /> </td> <td> <input class="input" type="button" value=" I " onclick="add('I')" id="i" /> </td> <td> <input class="input" type="button" value=" O " onclick="add('O')" id="o" /> </td> <td> <input class="input" type="button" value=" P " onclick="add('P')" id="p" /> </td> <td> <input class="input" type="button" value=" Ü " onclick="add('Ü')" id="ue" /> </td> <td> <input class="input" type="button" value=" + " onclick="add('+')" id="plus" /> </td> </tr> </table> </td> </tr> <tr> <td> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td> <input class="input" type="button" value=" A " onclick="add('A')" id="a" /> </td> <td> <input class="input" type="button" value=" S " onclick="add('S')" id="s" /> </td> <td> <input class="input" type="button" value=" D " onclick="add('D')" id="d" /> </td> <td> <input class="input" type="button" value=" F " onclick="add('F')" id="f" /> </td> <td> <input class="input" type="button" value=" G " onclick="add('G')" id="g" /> </td> <td> <input class="input" type="button" value=" H " onclick="add('H')" id="h" /> </td> <td> <input class="input" type="button" value=" J " onclick="add('J')" id="j" /> </td> <td> <input class="input" type="button" value=" K " onclick="add('K')" id="k" /> </td> <td> <input class="input" type="button" value=" L " onclick="add('L')" id="l" /> </td> <td> <input class="input" type="button" value=" Ö " onclick="add('Ö')" id="oe" /> </td> <td> <input class="input" type="button" value=" Ä " onclick="add('Ä')" id="ae" /> </td> <td> <input class="input_r" type="submit" value=" ENTER " /> </td> </tr> </table> </td> </tr> <tr> <td> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="11"> </td> <td> <input class="input" type="button" value=" < " onclick="add('<')" id="klals" /> </td> <td> <input class="input" type="button" value=" Y " onclick="add('Y')" id="y" /> </td> <td> <input class="input" type="button" value=" X " onclick="add('X')" id="x" /> </td> <td> <input class="input" type="button" value=" C " onclick="add('C')" id="c" /> </td> <td> <input class="input" type="button" value=" V " onclick="add('V')" id="v" /> </td> <td> <input class="input" type="button" value=" B " onclick="add('B')" id="b" /> </td> <td> <input class="input" type="button" value=" N " onclick="add('N')" id="n" /> </td> <td> <input class="input" type="button" value=" M " onclick="add('M')" id="m" /> </td> <td> <input class="input" type="button" value=" , " onclick="add(',')" id="komma" /> </td> <td> <input class="input" type="button" value=" . " onclick="add('.')" id="punkt" /> </td> <td> <input class="input" type="button" value=" - " onclick="add('-')" id="bindestrich" /> </td> <td> <input class="input" type="button" value=" groß/klein " onclick="document.getElementById('zwei').value = '"';" /> </td> </tr> </table> </td> </tr> <tr> <td> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="103"> </td> <td> <input style="width:233px;" class="input_s" type="button" value=" " onclick="add(' ')" /> </td> <td> <input class="input_s" type="button" value=" Alt Gr " onclick="notuse();altgr();" /> </td> </tr> </table> </td> </tr> </table> </form> <script language="JavaScript" type="text/javascript"> //<![CDATA[ <!-- function add(Zeichen) { window.document.Keyboard.Display.value = window.document.Keyboard.Display.value + Zeichen; } function backspace() { document.Keyboard.Display.value = document.Keyboard.Display.value.substring(0,document.Keyboard.Display.value.length-1); } function altgr() { document.getElementById('q').value = '@'; document.getElementById('m').value = 'µ'; document.getElementById('plus').value = '~'; document.getElementById('klals').value = '|'; document.getElementById('zwei').value = '²'; document.getElementById('drei').value = '³'; document.getElementById('sieben').value = '{'; document.getElementById('acht').value = '['; document.getElementById('neun').value = ']'; document.getElementById('null').value = '}'; document.getElementById('fragez').value = '\'; } function notuse() { document.getElementById('w').disabled=true; document.getElementById('e').disabled=true; document.getElementById('r').disabled=true; document.getElementById('t').disabled=true; document.getElementById('z').disabled=true; document.getElementById('u').disabled=true; document.getElementById('i').disabled=true; document.getElementById('o').disabled=true; document.getElementById('p').disabled=true; document.getElementById('ue').disabled=true; document.getElementById('a').disabled=true; document.getElementById('s').disabled=true; document.getElementById('d').disabled=true; document.getElementById('f').disabled=true; document.getElementById('g').disabled=true; document.getElementById('h').disabled=true; document.getElementById('j').disabled=true; document.getElementById('k').disabled=true; document.getElementById('l').disabled=true; document.getElementById('oe').disabled=true; document.getElementById('ae').disabled=true; document.getElementById('y').disabled=true; document.getElementById('x').disabled=true; document.getElementById('c').disabled=true; document.getElementById('v').disabled=true; document.getElementById('b').disabled=true; document.getElementById('n').disabled=true; document.getElementById('komma').disabled=true; document.getElementById('punkt').disabled=true; document.getElementById('bindestrich').disabled=true; document.getElementById('eins').disabled=true; document.getElementById('vier').disabled=true; document.getElementById('fuenf').disabled=true; document.getElementById('sechs').disabled=true; } //--> //]]> </script>
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)