שלום לכולםנתקלתי בבעיה קטנה
תראו בתא הראשון של הtable שמתי onclick ואני יודע שיש בעיה שם.
מישהו בבקשה יכול להסביר לי מה הטעות שלי ומה עושים כדי לפתור אותה?
תודה רבה
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1255" /> <title>Untitled Document</title> </head> <body><script language="javascript"> function mulboard(wi,he,co) { var i; var j; document.write("<table width='100%' height='100%' border='1'>"); for (i=1;i<=wi;i++) { document.write("<tr align='center'>"); for (j=1;j<=he;j++) { if ((i==1)||(j==1)) document.write("<td id='a1' onclick='document.all.a1.bgColor="+co+"'><b>"+i*j+"</b></td>"); else document.write("<td>"+i*j+"</td>"); } document.write("</tr>"); } document.write("</table>"); } </script> </table> <form> <input type="text" id="bb"> <input type="text" id="aa"> <input type="button" value="send" onClick="mulboard(document.all.bb.value,document.all.aa.value,'blue');"> </form> </body> </html>
|