function getWindowsUserName()
{
var WinNetwork = new ActiveXObject("WScript.Network");
var urlToSite = createCustomURL(WinNetwork.UserName);
document.getElementById("psyncLink").src = urlToSite;
if(requestingPassword())
{
alert("password button screen");
} else {
alert("direct password required");
}
}
function requestingPassword()
{ // <-- This is the line that is getting the error
// Unspecified error
// Code: 80004005
// Microsoft JScript Runtime error
var btn = window.frames[1].document.getElementsByName("SUBMIT-password.pss");
if (btn.length == 0) {
return false;
} else {
return true;
}
}
我希望 requestingPassword 是一个 bool 方法,但后来我了解到 Javascript 不支持方法名称,例如
public bool nameofmethod()
我认为语法是正确的。任何帮助,将不胜感激!