document.body.onclick=dowhat;这个单击事件在VBSCript里应该怎么写呢? oPopup.document.body.onclick=dowhat()给dowhat加上()试试。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你的javascript能不能运行,可以的话,给出完整代码先 to xzq686(瞬) (不行<html><head /><body><script language="vbscript">dim imagewidth,imageheight,speed,poptext,x,y,oPopup,oPopupBody,pop_TC,startani_Amypopfunction mypop()imagewidth=218imageheight=98speed=40poptext="<table bgcolor=#FFFFFF bordercolor=#B20000 border=1 style='font-size:9pt;' width='100%'><tr><td align=center style='background-color:#b20000;color:white;font-family:Arial;font-Weight:bold'>CopyRight © www.xxxx.com </td></tr><td align=center style='font-family:Verdana;'><table border=0 cellpadding=0 style='font-size:9pt;border-collapse:collapse'><tr><td align=center colspan=3>" & "xxx网" & "提示您:" & "" & " " & "" & "<br></td></tr><tr height=30><td align=right width=90><b>" & "newgoals_A" & "<td align=center width=38><b>" & "1" & "-" & "2" & "<td width=90><b>"+"newgoals_B"+"</td></tr></table></td></tr><td align=center style='background-color:#B20000;color:white;'><span style='background-color: #FFFF00;color=#FF0000'>" & "showtips_mantext" & "</span></td></tr></table>"x=screen.width-imagewidthy=0set oPopup = window.createPopup() set oPopupBody = oPopup.document.body oPopupBody.style.cursor="hand" oPopupBody.innerHTML = poptext pop_TC=200 oPopup.document.body.onclick=kkpop( ) end function function pop( )if pop_TC=200 thenoPopup.show x,y,imagewidth, imageheight end ifstartani_A=setTimeout("pop",100)if pop_TC<0 thendismisspopup() end ifpop_TC=pop_TC-1end functionfunction dismisspopup()clearTimeout startani_A oPopup.hide()end function function kk()oPopup.hide()end function</script></body></html> js写法: oPopup.document.body.onclick=dowhat;vbs写法: Set oPopup.document.body.onclick = GetRef("dowhat") cuixiping(无心) 是错误的,首先,vbscript中的set关键字是用来创建对象的,而不是设置属性的其次,document.body.onclick没有此方法,应该改成document.onclick即可即oPopup.document.onclick = GetRef("dowhat")还有楼主上面的代码乱哄哄的,没有帮忙看有没有其它错误 to BubbleInDiamond(钻石里的泡泡) cuixiping(无心)是正确的 js刷新页面问题 大家帮我看下IE下脚本调试return JSON.parse(a) 无效字符 二维数组赋值问题,谢谢! js获取file框里面的文件路径 jquery ui dialog问题 小数转换 关于onclick事件如何在最后验证成功后跳到下一个页面。 js如何批量修改gridview中一列控件的值?在线求解 kindeditor上传图片,怎么默认打开本地图片啊? 请问一下js大神们这个如何转成ts格式的,加红那一段请教一下怎么转 在JS中,如何将判断某个值中是否含有特定的字串? 一个简单的问题!up有分了!
不行<html>
<head />
<body>
<script language="vbscript">
dim imagewidth,imageheight,speed,poptext,x,y,oPopup,oPopupBody,pop_TC,startani_A
mypop
function mypop()imagewidth=218
imageheight=98
speed=40
poptext="<table bgcolor=#FFFFFF bordercolor=#B20000 border=1 style='font-size:9pt;' width='100%'><tr><td align=center style='background-color:#b20000;color:white;font-family:Arial;font-Weight:bold'>CopyRight © www.xxxx.com </td></tr><td align=center style='font-family:Verdana;'><table border=0 cellpadding=0 style='font-size:9pt;border-collapse:collapse'><tr><td align=center colspan=3>" & "xxx网" & "提示您:" & "" & " " & "" & "<br></td></tr><tr height=30><td align=right width=90><b>" & "newgoals_A" & "<td align=center width=38><b>" & "1" & "-" & "2" & "<td width=90><b>"+"newgoals_B"+"</td></tr></table></td></tr><td align=center style='background-color:#B20000;color:white;'><span style='background-color: #FFFF00;color=#FF0000'>" & "showtips_mantext" & "</span></td></tr></table>"x=screen.width-imagewidth
y=0set oPopup = window.createPopup()
set oPopupBody = oPopup.document.body
oPopupBody.style.cursor="hand"
oPopupBody.innerHTML = poptext
pop_TC=200
oPopup.document.body.onclick=kk
pop( )
end function function pop( )
if pop_TC=200 then
oPopup.show x,y,imagewidth, imageheight
end if
startani_A=setTimeout("pop",100)
if pop_TC<0 then
dismisspopup()
end if
pop_TC=pop_TC-1
end functionfunction dismisspopup()
clearTimeout startani_A
oPopup.hide()end function function kk()
oPopup.hide()
end function
</script>
</body>
</html>
oPopup.document.body.onclick=dowhat;vbs写法:
Set oPopup.document.body.onclick = GetRef("dowhat")
cuixiping(无心)是正确的