找回密码
 注册
搜索
[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
查看: 22998|回复: 3

[网络连接] 批处理文件怎样通过网页重启路由?

[复制链接]
发表于 2011-12-29 14:29:49 | 显示全部楼层 |阅读模式
怎样通过网页重启路由?
重启页面源代码如下:
  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.        
  70.         document.write('<br>');
  71.         document.write('<div align="center">');
  72.         document.write('<input type="button" id="button" value="" class="'+TableButton+'" name="restart2" style="font-weight: bold" onClick="RebootchSubmit(this.form)">');
  73.         document.getElementById("button").value=Lang_Restart_Router[languagetype];                                
  74.         document.write('</div>');
  75.         PrintBlockEnd();
  76. }

  77. function PrintFactoryDefaultButton(isBegin)
  78. {
  79.         if (isBegin == "1")
  80.                 PrintBeginContent(Lang_Factory_Default[languagetype]);
  81.         else
  82.                 PrintBlockBegin(Lang_Factory_Default[languagetype]);
  83.         document.write('<br>');
  84.         document.write('<div align="center">');
  85.         document.write('<input type="button" id="factory button" value="" class="'+TableButton+'" name="restart3" style="font-weight: bold" onClick="chSubmit(this.form)">');
  86.         document.getElementById("factory button").value=Lang_Retrun_Factory_Default[languagetype];                                
  87.         document.write('</div>');
  88.         PrintBlockEnd();
  89. }
  90. //=============== End of Javascript ===============*/

  91. </script>
  92. </head>
  93. <body onLoad="Entryfunction();" onUnload="Leavefunction();">
  94. <table height="100%" class="contentframe" align="center" border="0" cellpadding="0" cellspacing="0">
  95.             <form id="submitform" name="submitform" method="post">
  96.            <input type="hidden" name="languageStatus" value="77">
  97.            <input type="hidden" name="EZVersion" value="1">
  98.            <input id ="languageType" type="hidden" name="languageType" value=2>   
  99.         </form>
  100.         <script>
  101.                   var languagetype=document.getElementById('languageType').value;
  102.                 document.title=Lang_Web_Management[languagetype];
  103.         </script>
  104.                
  105.         <script src="menu120020091104201931.js"></script> <!--<script src="menu.js"></script>-->
  106.         <script>
  107.                       SetItemInit(foldersTree, 7, 7);  
  108.                 if (hasVariableMenuNode)
  109.                         VariableMenuNodeSetting(foldersTree);
  110.                       initializeTree(foldersTree);
  111.         </script>

  112.         <form name="formRecover" action="sys_recover.htm" method="post">
  113.         <input type="hidden"  name="page" value="sys_recover.htm">
  114.         <input type="hidden"  name="restart" value="Restart Router">
  115.         <input type="hidden"  name="factory" value="Return to Factory Default Setting">                                  
  116.         <input type="hidden"  name="actVersion" value=''>
  117.         <input type="hidden"  name="s2Version" value=''>
  118.         <input type="hidden"  name="s3Version" value=''>
  119.         <input type="hidden"  name="restartBackup" value='0'>
  120.         <script>PrintContent();</script>
  121.         <script>PrintRight();</script>      
  122.         <script>PrintBottom();</script>   
  123. </table>
  124. </body>
  125. </html>
复制代码
发表于 2011-12-30 12:25:20 | 显示全部楼层
vbs 的sendkey 可以做到
发表于 2011-12-30 12:48:34 | 显示全部楼层
SendKeys,我笑了。
 楼主| 发表于 2011-12-30 12:50:29 | 显示全部楼层
那怎样定位到重启键呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|批处理之家 ( 渝ICP备10000708号 )

GMT+8, 2026-3-18 18:20 , Processed in 0.017896 second(s), 8 queries , File On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表