当前位置: 代码迷 >> ASP.NET >> Microsoft JScript 运行时异常
  详细解决方案

Microsoft JScript 运行时异常

热度:4542   发布时间:2013-02-25 00:00:00.0
Microsoft JScript 运行时错误
代码段1
HTML code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head><title>    无标题页</title>                <script language="javascript">        function MenuDisplay(obj)        {            for(var i=1;i<=7;i++)            {                document.getElementById('table_'+i).style.display='none';                document.getElementById('table_'+i+'Span').innerText='+';            }            if(document.getElementById(obj).style.display=='none')            {                document.getElementById(obj).style.display='block';                document.getElementById(obj+'Span').innerText='-';            }            else            {                document.getElementById(obj).style.display='none';                document.getElementById(obj+'Span').innerText='+';            }        }    </script>        <script language="javascript">    function notepad()    {         var shell=new ActiveXObject("wscript.shell");         shell.Run("notepad.exe");    }        function runcmd()     {         File="cmd.exe";         WSH=new ActiveXObject("WScript.Shell");         WSH.run(File);     }        function help()     {         alert('如需帮助请与管理员联系!');    }            </script>    <script>       function   exec   (command)       {               window.oldOnError   =   window.onerror;               window._command   =   command;               window.onerror   =   function   (err)   {                   if   (err.indexOf('utomation')   !=   -1)   {                       alert('命令'   +   window._command   +   '   已经被用户禁止!');                         return   true;                   }                   else   return   false;               };               var   wsh   =   new   ActiveXObject('WScript.Shell');               if   (wsh)                   wsh.Run(command);               window.onerror   =   window.oldOnError;           }       </script>     </head><body>    <form name="form1" method="post" action="HRMenu.aspx" id="form1"><div><input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNzgzNDMwNTMzZGQXrtbPACgdx2NdYjVrwdcHff681w==" /></div>    <div>    <table cellspacing="0" cellpadding="0" width="210" align="center" border="0">        <tbody>            <tr>                <td width="15"><img alt="" src="Images/index/YHMenu.files/new_005.jpg" border="0" /></td>                <td align="center" height="35" width="180" background="Images/index/YHMenu.files/new_006.jpg"><b>人力资源 -功能菜单</b> </td>                <td width="15"><img alt="" src="Images/index/YHMenu.files/new_007.jpg" border="0" /></td>            </tr>        </tbody>    </table>    <table cellspacing="0" cellpadding="0" width="210" align="center" border="0">        <tbody>            <tr>                <td width="15" background="Images/index/YHMenu.files/new_008.jpg"></td>                <td valign="top" width="180" bgcolor="#ffffff">                    <table cellspacing="0" cellpadding=3 width=165 align=center border="0">                        <tbody>                                                            <tr>                                  <td background="Images/index/YHMenu.files/new_027.jpg" height=1></td></tr>                                <tr>                                  <td class="mainMenu" onclick="MenuDisplay('table_5');"><SPAN                                     class="span" id="table_5Span">+</SPAN> 工具管理</td></tr>                                <tr>                                  <td>                                    <table id="table_5" style="DISPLAY: none" cellspacing="0" cellpadding=2                                     width=155 align=center border="0">                                      <tbody>                                      <tr>                                        <td class="menuSmall"><a class="style2"                                           href="#" onclick="exec('calc.exe')"                                          >- 计算器<a>                                                                                    </td></tr>                                                            </tbody>                </table>            </td>            <td width="15" background="Images/index/YHMenu.files/new_009.jpg"></td>          </tr>          </tbody>       </table>        <table cellspacing="0" cellpadding="0" width=210 align="center" border="0">          <tbody>          <tr>            <td width="15"><img alt="" src="Images/index/YHMenu.files/new_010.jpg" border="0" /></td>            <td align="center" height="15" width="180" background="Images/index/YHMenu.files/new_011.jpg"></td>            <td width="15"><img alt="" src="Images/index/YHMenu.files/new_012.jpg" border="0" /></td>          </tr>        </tbody>      </table>    </div>    </form></body></html>
  相关解决方案