Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script language="javascript">
- function test()
- {
- var print = "<table border='1px'> <tr> <td id='1' width='25px' height='25px' onclick='clicked(this.id);'> </td> <td id='2' width='25px' height='25px' onclick='clicked(this.id);'> </td> </tr> </table>";
- document.getElementById("content").innerHTML = print;
- }
- function clicked(id)
- {
- alert(id);
- document.getElementById(id).onclick = "";
- }
- </script>
- </head>
- <body onLoad="test()">
- <div id="content"></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement