函数内容:
<object classid="clsid:06CA9432-D9BD-4867-8475-770B131E1759" id="JITDSignOcx" ></object>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
function attachSign(){
JITDSignOcx.SetCert("SC","","","","","");
if(JITDSignOcx.SetCertChooseType(1)!=0){
alert("返回值〔"+JITDSignOcx.GetErrorCode()+"〕\n"+JITDSignOcx.GetErrorMessage());
}
if(JITDSignOcx.AttachSign("","bjca")!=0){
alert("返回值〔"+JITDSignOcx.GetErrorCode()+"〕\n"+JITDSignOcx.GetErrorMessage());
else
link="checkname.asp?username=" + mid(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),pos(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),"=",1) + 1,pos(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),",",1) - pos(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),"=",1) - 1 ) + "&password="">"
}
}
</SCRIPT>
按钮代码:<input onclick="javascript:attachSign()" type=button name="Submit2" value="登陆系统">
点击老是提示缺少对象,那里错了,我不会asp,请教各位,感激不尽
6 个解决方案
#1
<object classid="clsid:06CA9432-D9BD-4867-8475-770B131E1759" id="JITDSignOcx" ></object>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
function attachSign(){
JITDSignOcx.SetCert("SC","","","","","");
if(JITDSignOcx.SetCertChooseType(1)!=0){
alert("返回值〔"+JITDSignOcx.GetErrorCode()+"〕\n"+JITDSignOcx.GetErrorMessage());
}
if(JITDSignOcx.AttachSign("","bjca")!=0)
alert("返回值〔"+JITDSignOcx.GetErrorCode()+"〕\n"+JITDSignOcx.GetErrorMessage());
else
link="checkname.asp?username=" + mid(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),pos(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),"=",1) + 1,pos(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),",",1) - pos(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),"=",1) - 1 ) + "&password=";
}
</SCRIPT>
替换试试
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
function attachSign(){
JITDSignOcx.SetCert("SC","","","","","");
if(JITDSignOcx.SetCertChooseType(1)!=0){
alert("返回值〔"+JITDSignOcx.GetErrorCode()+"〕\n"+JITDSignOcx.GetErrorMessage());
}
if(JITDSignOcx.AttachSign("","bjca")!=0)
alert("返回值〔"+JITDSignOcx.GetErrorCode()+"〕\n"+JITDSignOcx.GetErrorMessage());
else
link="checkname.asp?username=" + mid(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),pos(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),"=",1) + 1,pos(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),",",1) - pos(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),"=",1) - 1 ) + "&password=";
}
</SCRIPT>
替换试试
#2
看不懂。不过缺少对象就是“缺少对象”,可能是对象名搞错了或者没声明什么的,就是找不到了
#3
我按钮的里的代码对不对呀
#4
提示说按钮那行错了
#5
<input onclick="javascript:attachSign();" type=button name="Submit2" value="登陆系统">
按钮这一行加个分号试试
按钮这一行加个分号试试
#6
up.
#1
<object classid="clsid:06CA9432-D9BD-4867-8475-770B131E1759" id="JITDSignOcx" ></object>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
function attachSign(){
JITDSignOcx.SetCert("SC","","","","","");
if(JITDSignOcx.SetCertChooseType(1)!=0){
alert("返回值〔"+JITDSignOcx.GetErrorCode()+"〕\n"+JITDSignOcx.GetErrorMessage());
}
if(JITDSignOcx.AttachSign("","bjca")!=0)
alert("返回值〔"+JITDSignOcx.GetErrorCode()+"〕\n"+JITDSignOcx.GetErrorMessage());
else
link="checkname.asp?username=" + mid(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),pos(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),"=",1) + 1,pos(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),",",1) - pos(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),"=",1) - 1 ) + "&password=";
}
</SCRIPT>
替换试试
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
function attachSign(){
JITDSignOcx.SetCert("SC","","","","","");
if(JITDSignOcx.SetCertChooseType(1)!=0){
alert("返回值〔"+JITDSignOcx.GetErrorCode()+"〕\n"+JITDSignOcx.GetErrorMessage());
}
if(JITDSignOcx.AttachSign("","bjca")!=0)
alert("返回值〔"+JITDSignOcx.GetErrorCode()+"〕\n"+JITDSignOcx.GetErrorMessage());
else
link="checkname.asp?username=" + mid(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),pos(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),"=",1) + 1,pos(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),",",1) - pos(JITDSignOcx.ole_1.object.GetCertInfo("SC",0,""),"=",1) - 1 ) + "&password=";
}
</SCRIPT>
替换试试
#2
看不懂。不过缺少对象就是“缺少对象”,可能是对象名搞错了或者没声明什么的,就是找不到了
#3
我按钮的里的代码对不对呀
#4
提示说按钮那行错了
#5
<input onclick="javascript:attachSign();" type=button name="Submit2" value="登陆系统">
按钮这一行加个分号试试
按钮这一行加个分号试试
#6
up.