<script language=vbscript> sub sure() msg = "Do you want to continue?" title = "MsgBox Demonstration" response = MsgBox(msg,vbOKCancel,title) if response=1 then msgbox("yes") end if end sub </script>but.Attributes.Add("onclick", "sure()")
btn.Attributes.Add("onclick","vbscript:if msgbox(\"aaa\",vbYesNo)=vbNo then window.Event.returnValue=false")
sub sure()
msg = "Do you want to continue?"
title = "MsgBox Demonstration"
response = MsgBox(msg,vbOKCancel,title)
if response=1 then
msgbox("yes")
end if
end sub
</script>but.Attributes.Add("onclick", "sure()")