Jump to content

fai960820

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About fai960820

  • Rank
    Newbie
  1. <script>int[][] num = new int[4][5];num[1][1]={0,1,2,3,4};alert(num[1][2]);</script> This give my an error " Uncaught SyntaxError: Unexpected token ] " (shown by chrome) #for the "int[][] num = new int[4][5];" line Please help.
  2. I know what is the problem! It only doesnt work in IE, others work.' (Only IE have problem) Is there a way to slove that? also, if i want alert_two to have arguments, like function show(){ document.write('<button id="a">Press Me</button>'); document.getElementById("a").onclick = alert_two("HelloWorld");} function alert_two(x){ alert(x);} It will alert when i press "Hello World" which i dont want , is there an way to slove that? (Not only IE) btw, really thank you for you help.
  3. Here is the problem... <button onclick="show()">HelloWorld</button><script type="text/javascript">function show(){document.write("<button id=\"a\">Press Me</button>");document.getElementById("a").onclick = function{alert("two");}} The "HelloWorld" button will work, it will overwrite (i want it overwrite) and show the "Press me" button. The problem is in the "Press me" button, it wont alert "two", there is no respown. If i change it like this... <button onclick="show()">HelloWorld</button><script type="text/javascript">function show(){docume
×
×
  • Create New...