写注册表 && TABLAE相关

写注册表:

 1<script>   
 2var WshShell = WScript.CreateObject("WScript.Shell");   
 3WshShell.RegWrite ("HKCU\\\Software\\\ACME\\\FortuneTeller\\\", 1, "REG_BINARY");   
 4WshShell.RegWrite ("HKCU\\\Software\\\ACME\\\FortuneTeller\\\MindReader", "Goocher!", "REG_SZ");   
 5var bKey = WshShell.RegRead ("HKCU\\\Software\\\ACME\\\FortuneTeller\\\");   
 6WScript.Echo (WshShell.RegRead ("HKCU\\\Software\\\ACME\\\FortuneTeller\\\MindReader"));   
 7WshShell.RegDelete ("HKCU\\\Software\\\ACME\\\FortuneTeller\\\MindReader");   
 8WshShell.RegDelete ("HKCU\\\Software\\\ACME\\\FortuneTeller\\\");   
 9WshShell.RegDelete ("HKCU\\\Software\\\ACME\\\");   
10</script>

TABLAE相关(客户端动态增加行列)

 1<html>
 2<script language="JScript">   
 3function numberCells() {   
 4var count=0;   
 5for (i=0; i < document.all.mytable.rows.length; i++) {   
 6for (j=0; j < document.all.mytable.rows(i).cells.length; j++) {   
 7document.all.mytable.rows(i).cells(j).innerText = count;   
 8count++;   
 9}   
10}   
11}   
12</script>
13<body onload="numberCells()">
14<table border="1" id="mytable">
15<tr><th> </th><th> </th><th> </th><th> </th></tr>
16<tr><td> </td><td> </td><td> </td><td> </td></tr>
17<tr><td> </td><td> </td><td> </td><td> </td></tr>
18</table>
19</body>
20</html>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus