Board logo

标题: [网络连接] 批处理文件怎样通过网页重启路由? [打印本页]

作者: zever    时间: 2011-12-29 14:29     标题: 批处理文件怎样通过网页重启路由?

怎样通过网页重启路由?
重启页面源代码如下:
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta name="Pragma" content="no-cache">
  5. <meta name="Expires" content="-1">
  6. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  7. <title></title>
  8. <base target="_self">
  9. <link type="text/css" rel="stylesheet" href="nk.css">
  10. <script src="nk120020091104201931.js"></script> <!--<script src="nk.js"></script>-->
  11. <script src="lg1200220091104201931.js"></script> <!--<script src="cn/lg.js"></script>-->
  12. <script src="StrArray120020091104201931.js"></script> <!--<script src="StrArray.js"></script>-->
  13. <script language="JavaScript">
  14. /***************************************************/
  15. /*      */
  16. /*       Begin of content's JavaScript function        */
  17. /*     */
  18. /***************************************************/
  19. function Entryfunction()
  20. {
  21. CheckAccessAllow();
  22. }
  23. function Leavefunction()
  24. {
  25. }
  26. function chSubmit(F)
  27. {
  28. if (confirm(cFactoryDefault))
  29. {
  30. F.restart.value="";  
  31. window.status=wDefaultSetting;
  32. F.submit();
  33. }  
  34. }
  35. function RebootchSubmit(F)
  36. {
  37. if (confirm(cRestart))
  38. {
  39. F.factory.value="";
  40. window.status=wRestart;
  41. F.submit();
  42. }  
  43. }
  44. //=============== End of Javascript ===============*/
  45. /***************************************************/
  46. /*    */
  47. /*         Begin of content       */
  48. /*    */
  49. /***************************************************/
  50. var ButtonType = "";
  51. function PrintContent()
  52. {
  53. PrintHead();
  54. PrintRestartButton(1);
  55. PrintFactoryDefaultButton(0);
  56. PrintEndContent();
  57. }
  58. function VariableMenuNodeSetting(RootNode)
  59. {  
  60. if ('0' =='2' )
  61. ChangeCmsNode(RootNode, VariableMenuNode1);
  62. }
  63. function PrintRestartButton(isBegin)
  64. {
  65. if (isBegin == "1")
  66. PrintBeginContent(Lang_Restart[languagetype]);
  67. else
  68. PrintBlockBegin(Lang_Restart[languagetype]);
  69. document.write('<br>');
  70. document.write('<div align="center">');
  71. document.write('<input type="button" id="button" value="" class="'+TableButton+'" name="restart2" style="font-weight: bold" onClick="RebootchSubmit(this.form)">');
  72. document.getElementById("button").value=Lang_Restart_Router[languagetype];
  73. document.write('</div>');
  74. PrintBlockEnd();
  75. }
  76. function PrintFactoryDefaultButton(isBegin)
  77. {
  78. if (isBegin == "1")
  79. PrintBeginContent(Lang_Factory_Default[languagetype]);
  80. else
  81. PrintBlockBegin(Lang_Factory_Default[languagetype]);
  82. document.write('<br>');
  83. document.write('<div align="center">');
  84. document.write('<input type="button" id="factory button" value="" class="'+TableButton+'" name="restart3" style="font-weight: bold" onClick="chSubmit(this.form)">');
  85. document.getElementById("factory button").value=Lang_Retrun_Factory_Default[languagetype];
  86. document.write('</div>');
  87. PrintBlockEnd();
  88. }
  89. //=============== End of Javascript ===============*/
  90. </script>
  91. </head>
  92. <body onLoad="Entryfunction();" onUnload="Leavefunction();">
  93. <table height="100%" class="contentframe" align="center" border="0" cellpadding="0" cellspacing="0">
  94.     <form id="submitform" name="submitform" method="post">
  95.    <input type="hidden" name="languageStatus" value="77">
  96.    <input type="hidden" name="EZVersion" value="1">
  97.    <input id ="languageType" type="hidden" name="languageType" value=2>   
  98. </form>
  99. <script>
  100.    var languagetype=document.getElementById('languageType').value;
  101. document.title=Lang_Web_Management[languagetype];
  102. </script>
  103. <script src="menu120020091104201931.js"></script> <!--<script src="menu.js"></script>-->
  104. <script>
  105.        SetItemInit(foldersTree, 7, 7);  
  106. if (hasVariableMenuNode)
  107. VariableMenuNodeSetting(foldersTree);
  108.        initializeTree(foldersTree);
  109. </script>
  110. <form name="formRecover" action="sys_recover.htm" method="post">
  111. <input type="hidden"  name="page" value="sys_recover.htm">
  112. <input type="hidden"  name="restart" value="Restart Router">
  113. <input type="hidden"  name="factory" value="Return to Factory Default Setting">   
  114. <input type="hidden"  name="actVersion" value=''>
  115. <input type="hidden"  name="s2Version" value=''>
  116. <input type="hidden"  name="s3Version" value=''>
  117. <input type="hidden"  name="restartBackup" value='0'>
  118. <script>PrintContent();</script>
  119. <script>PrintRight();</script>      
  120. <script>PrintBottom();</script>   
  121. </table>
  122. </body>
  123. </html>
复制代码

作者: BillGates    时间: 2011-12-30 12:25

vbs 的sendkey 可以做到
作者: Demon    时间: 2011-12-30 12:48

SendKeys,我笑了。
作者: zever    时间: 2011-12-30 12:50

那怎样定位到重启键呢?




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2