Chciałem napisac szachownice w js. Wiec za pomocą2 pętli ja tworze i po najechaniu na element szachownicy wyswietlenie aktualnego pola. Oto skrypt:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1250"> <script language="javascript"> <!-- function show(txt) { document.getElementById('pole').value = 'Pole '+txt; } //--> </script> </head> <body> <script language="javascript"> <!-- for(var i=1; i<9; i++) { for(var j=1; j<9; j++) { document.write('<span onmouseover="show(j*i)" onmouseout="show()">*</span>'); } document.write('<br />'); } //--> </script> </body> </html>
No i gdy najade na element to wyswietla mi tylko 81 ;/