HTML 点击 按钮 调用loginSubmit()
<form name="loginForm" onsubmit="loginSubmit()" method="post">function loginSubmit()
{
  alert("test")
}经测试,最简单的alert("test")也是相同的情况,通过IP访问 无法运行

解决方案 »

  1.   

    <form name="loginForm" onsubmit="return loginSubmit()" method="post"> function loginSubmit() 

      alert("test") 

      

  2.   

    http://topic.csdn.net/u/20080325/13/5450d4bc-1d38-4e59-94a0-0d5af6f3e4e5.html
    看看是否有用。
      

  3.   

    你IIS设置了吗??在IIS右击————属性---勾掉“允许IIS控制密码”和“集成windows身份验证”。
    如果这个做了还不行
    就到IE浏览器下把你iP的访问地址加到IE———工具——internet选项——安全———受信任站点的目录下试一试
    如果还不行
    我就没辙了,在请高手出来指点
      

  4.   


    <%@ Page Language="vb" AutoEventWireup="false" Codebehind="Index.aspx.vb" Inherits="XXXX.WebForm1" %> 
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
    <HTML> 
    <HEAD> 
    <title>Login to my.seagate.com </title> 
    <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 
    <link title="default" href="http://10.38.79.15/Library.NET/mySGLogon/styles/emp.css" type="text/css" 
    rel="stylesheet"> 
    </HEAD> 
    <body leftMargin="0" topMargin="0" marginwidth="0" marginheight="0"> 
    <!-- Logo bar. --> 
    <table cellSpacing="0" cellPadding="0" width="100%" border="0"> 
    <tr> 
    <td rowSpan="2"> <img height="97" alt="Seagate" src="http://10.38.79.15/Library.NET/mySGLogon/images/logo_home_seagate.gif" 
    width="335" border="0"> 
    </td> 
    <td vAlign="bottom" width="100%"> <SPAN style="FONT: 24px 'Verdana','Arial','Helvetica','Sans-serif'; COLOR: #888888">HGSA Process&nbsp;&nbsp; 
    </SPAN> 
    </td> 
    <td> <img height="73" alt="spacer" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" 
    width="1" border="0"> </td> 
    </tr> 
    <tr> 
    <td vAlign="bottom"> <img height="27" alt="spacer" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" 
    width="410" border="0"> </td> 
    <td>&nbsp; </td> 
    </tr> 
    </table> 
    <table class="headerHome" cellSpacing="0" cellPadding="0" width="100%" border="0"> 
    <tr> 
    <td> <img height="97" alt="Art" src="http://10.38.79.15/Library.NET/mySGLogon/images/photol_emp_blue.gif" 
    width="335" border="0"> </td> 
    <td vAlign="middle" width="100%"> 
    <table cellSpacing="0" cellPadding="0" border="0"> 
    <tr> 
    <form name="loginForm" onsubmit="loginSubmit()" method="post"> 
    <td colSpan="5"> <img height="17" alt="Please Login" src="http://10.38.79.15/Library.NET/mySGLogon/images/txtl_emp_please_login.gif" 
    width="95" border="0"> </td> 
    </tr> 
    <tr> 
    <td class="headerHome" vAlign="bottom" colSpan="2"> <img height="5" alt="spacer" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" 
    width="1" border="0"> <br> 
    User&nbsp;ID 
    </td> 
    <td class="headerHome" vAlign="bottom" colSpan="3">Password </td> 
    </tr> 
    <tr> 
    <td vAlign="middle"> <input class="formSmlFieldInput" type="text" size="20" name="User"> </td> 
    <td class="headerHome">&nbsp;&nbsp;&nbsp; </td> 
    <td vAlign="middle"> <input class="formSmlFieldInput" type="password" size="20" name="Password"> </td> 
    <td class="headerHome">&nbsp;&nbsp;&nbsp; </td> 
    <td vAlign="middle"> <input type="image" height="13" alt="Login" width="24" src="http://10.38.79.15/Library.NET/mySGLogon/images/btn_go_grn.gif" 
    border="0" name="Submit"> <input type="hidden" value="http://my.seagate.com/tibco/mySeagate" name="target"> <input type="hidden" value="0" name="smauthreason"> 
    </td> 
    </FORM> </tr> 
    </table> 
    <img height="1" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" width="410" 
    border="0"> </td> 
    </TD> 
    <td> <img height="1" alt="spacer" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" 
    width="15" border="0"> </td> 
    </tr> 
    </table> 
    <!-- Content table. --> 
    <table cellSpacing="0" cellPadding="0" width="100%" border="0"> 
    <tr> 
    <td rowSpan="2"> <img height="1" alt="spacer" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" 
    width="59" border="0"> 
    </td> 
    <td> <img height="25" alt="spacer" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" 
    width="256" border="0"> 
    </td> 
    <td rowSpan="2"> <img height="1" alt="spacer" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" 
    width="20" border="0"> 
    </td> 
    <td> <img height="1" alt="spacer" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" 
    width="300" border="0"> 
    </td> 
    <td width="100%" rowSpan="2"> <img height="1" alt="spacer" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" 
    width="126" border="0"> 
    </td> 
    </tr> 
    <tr> 
    <td class="story" vAlign="top"> 
    <p> <A href="https://register.okla.seagate.com/register/index.jsp"> <IMG height="13" alt="*" src="/Library.NET/mySGLogon/images/blt_square_black.gif" width="7" 
    border="0">I forgot my password </A> <br> 
    <A href="https://register.okla.seagate.com/register/index.jsp"> <IMG height="13" alt="*" src="/Library.NET/mySGLogon/images/blt_square_black.gif" width="7" 
    border="0">I want to change my password </A> <br> 
    <A href="https://register.okla.seagate.com/register/Help/help.htm"> <IMG height="13" alt="*" src="/Library.NET/mySGLogon/images/blt_square_black.gif" width="7" 
    border="0">I need registration help </A> <br> 
    <p> <span class="txtHdr"> <img height="13" alt="*" src="http://10.38.79.15/Library.NET/mySGLogon/images/blt_square_black.gif" 
    width="7" border="0">I'm a new user,  <A href="https://register.okla.seagate.com/register/index.jsp"> 
    sign me up! </A> </span> 
    </p> 
    </td> 
    <td class="story" vAlign="top"> 
    <p> 
    <p> 
    <p> <br> 
    &nbsp; 
    </p> 
    </td> 
    </tr> 
    </table> 
    <!-- Footer and copyright. --> <img height="25" alt="spacer" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" 
    width="1" border="0"> <br> 
    <table cellSpacing="0" cellPadding="0" width="100%" border="0"> 
    <tr> 
    <td class="footer"> <img height="1" alt="spacer" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" 
    width="15" border="0"> 
    </td> 
    <td class="footer" vAlign="middle" width="100%">&nbsp; </td> 
    <td class="footer"> <img height="18" alt="spacer" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" 
    width="15" border="0"> </td> 
    </tr> 
    <tr> 
    <td class="copyright"> <img height="1" alt="spacer" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" 
    width="15" border="0"> 
    </td> 
    <td class="copyright" vAlign="middle" align="right">Copyright&nbsp;©2002,&nbsp;Seagate&nbsp;Technology&nbsp;LLC&nbsp;&nbsp; ¦&nbsp;&nbsp;Legal <br> 
    <img height="1" alt="spacer" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" 
    width="730" border="0"> 
    </td> 
    <td class="copyright"> <img height="18" alt="spacer" src="http://10.38.79.15/Library.NET/mySGLogon/images/t.gif" 
    width="15" border="0"> </td> 
    </tr> 
    </table> 
    &nbsp; <br> 
    <SCRIPT language="javascript"> 
      

  5.   

    <!-- 
    window.document.loginForm.User.focus(); 
    function loginSubmit() 
    {    
        var tmpPassword 
    tmpPassword=loginForm.Password.value.replace(/&/g, "&amp;").replace(/ </g,"&lt;").replace(/>/g, "&gt;"); 
    tmpPassword=tmpPassword.replace(/'/g, "&apos;").replace(/"/g,"&quot;"); var strXML=" <Template> <GlobalID>"+loginForm.User.value+ 
    " </GlobalID> <Password>"+tmpPassword+" </Password> </Template>" if (document.implementation && document.implementation.createDocument) 

    //var xmldoc = document.implementation.createDocument("", "doc", null); 
    var xmldoc = document.implementation.createDocument("","",null); 
    xmldoc.async=false;     var objDOMParser = new DOMParser(); 
    xmldoc = objDOMParser.parseFromString(strXML, "text/xml"); var poster = new XMLHttpRequest() 

    else if (window.ActiveXObject) 

    var xmldoc = new ActiveXObject("Microsoft.XMLDOM"); 
    xmldoc.async=false; 
    xmldoc.loadXML(strXML); var poster = new ActiveXObject("Microsoft.XMLHTTP"); 

    poster.open("POST","http://10.38.79.15/Library.NET/mySGLogon/mySGLoginVerify.asp",false); 
    poster.send(xmldoc); var txtResult=poster.responseText; 
    var separator=";acegikbdfhj;"; 
    var arrayResult=txtResult.split(separator); 
    var mySeagateLogon,UserGID,UserName,UserSite,UserDept,UserTitle; for (var i=0; i <arrayResult.length;i++) 

    if (arrayResult[i].substring(0,15)=="mySeagateLogon=") 
    mySeagateLogon=arrayResult[i].substr(15); 
    else if (arrayResult[i].substring(0,8)=="UserGID=") 
    UserGID=arrayResult[i].substr(8); 
    else if (arrayResult[i].substring(0,9)=="UserName=") 
    UserName=escape(arrayResult[i].substr(9)); 
    else if (arrayResult[i].substring(0,9)=="UserSite=") 
    UserSite=escape(arrayResult[i].substr(9)); 
    else if (arrayResult[i].substring(0,9)=="UserDept=") 
    UserDept=escape(arrayResult[i].substr(9)); 
    else if (arrayResult[i].substring(0,10)=="UserTitle=") 
    UserTitle=escape(arrayResult[i].substr(10)); 
    } if (mySeagateLogon=="OK") 

    document.cookie="mySGLogonUserGID="+UserGID+";path=/;expires=Thu 31 Dec 2099 12:00:00 GMT"; 
    document.cookie="mySGLogonUserName="+UserName+";path=/;expires=Thu 31 Dec 2099 12:00:00 GMT"; 
    document.cookie="mySGLogonUserSite="+UserSite+"-"+UserDept+";path=/;expires=Thu 31 Dec 2099 12:00:00 GMT"; document.cookie="mySGLogonOK=Y;path=/;"; 
            loginForm.action="/HGSA/index2.aspx?GID="+loginForm.User.value 

    else 
    loginForm.action="http://10.38.79.15/Library.NET/mySGLogon/mySGErrorMsg.asp" 

    //--> 
    </SCRIPT> 
    <SCRIPT language="JavaScript"> 
    if (typeof(cache)!="undefined") 
    cacheOff(); 
    </SCRIPT> 
    </body> 
    </HTML> 
      

  6.   

    服务器上如果你的IP不是只邦定一个站点,用IP那是不行的
      

  7.   

    Javascript 需要服务器端 解释吗?
      

  8.   

    客户端js不需要服务器端解释,现在有可能的问题是你的页面产生html之后由于前面的js出现问题导致后面的无法执行了。
    你在firefox下调试,可以在工具的javascript控制台里看是否有错误.
      

  9.   

    没有。NET环境无法帮你调试了
    JS主要看宿主,跟是不是服务器没关系,你写一个静态的html文件里面含有JS代码,直接双击他也是可以运行的
      

  10.   

    ASP的用程序调试了,是可以运行
    没问题
      

  11.   

    js是客户端脚本,你能访问到这个页面,如果该页面的源代码是符合你的设想的,那么跟服务端就完全没有关系了。js不执行的可能应该从js的代码是否有错误(这个错误可能不是你当前执行的函数,而可能是页面上的其他js出错了),客户端的IE安全设置等是否允许js脚本等方面考虑。