Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何制作与IE7、Chrome、Mozilla和Safari兼容的.NET/JavaScript登录页面?_Javascript_.net_Asp.net_Vb.net - Fatal编程技术网

如何制作与IE7、Chrome、Mozilla和Safari兼容的.NET/JavaScript登录页面?

如何制作与IE7、Chrome、Mozilla和Safari兼容的.NET/JavaScript登录页面?,javascript,.net,asp.net,vb.net,Javascript,.net,Asp.net,Vb.net,我有一个.NET登录页面。它可以在InternetExplorer7中正常工作,但我想让它与Chrome、Mozilla和Safari兼容 背后的登录代码是: Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogin.Click {.................. ScriptManager.RegisterStartupScript(Me, Me.

我有一个.NET登录页面。它可以在InternetExplorer7中正常工作,但我想让它与Chrome、Mozilla和Safari兼容

背后的登录代码是:

Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogin.Click

{..................

ScriptManager.RegisterStartupScript(Me, Me.GetType(), "test", "login()", True)

........}
ASPX页面代码为:

function login()

{

    if(document.getElementById("ctl00_Sidebar_Contentplaceholder_Lo1_SaveFlag").value =="Y") 

    {
        window.open("Home.aspx?PlotRef=" + document.all("ctl00_Sidebar_Contentplaceholder_Lo1_SaveFlag").value + "&print=print","",'location=no,fullscreen=no,menubar=no,titlebar=yes,status=yes,toolbar=no,scrollbars=yes,resizable=yes');    

        if(document.getElementById("ctl00_Sidebar_Contentplaceholder_Lo1_hidChangePass").value =="Y") 
        {
            window.open("ChangePass.aspx","ChangePassword","top=50,left=50,height=310,width=725,location=no,menubar=no,status=yes,addressbar=no,toolbar=no,scrollbars=no,fullscreen=no,resizable=no")
        }  

        window.open('','_self','');
        window.close();      
    }
} 

这是行不通的。我试图调试它,但在调试模式下,光标只会一步一步地遍历代码。我无法在aspx页面上输入javascript
login()
函数。

如果你想调试你的javascript,那么你可以在代码中添加“调试器”;这应该作为浏览器内置调试器的断点(Chrome有一个调试器)


您想在这里使用的是document.all吗?getElementById或getElementsByName是否同样有效,但在所有浏览器中都受支持?

我不知道您在问什么。您是在问如何在这些浏览器中调试javascript,还是想知道javascript的问题?我们可能需要更多的代码来进行正确的诊断。您的答案是