-
墨色风雨
例子1:调用函数方式<HTML><HEAD><TITLE>测试按钮事件</TITLE><SCRIPT LANGUAGE="VBScript">Function test()msgbox "你还真点我?"End Function</SCRIPT></HEAD><BODY><input type="button" value="点击我" onclick="vbscript:test()"></BODY></HTML>=====================================================例子2:事件触发方式<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>VBSCRIPT与html</title></head><script language="vbscript">option explicitdim a,b,csub btmshow_onclicka=abc.text1.valueb=abc.text2.valueif a>b thenc = aelsec=bend ifabc.text3.value=cend sub</script><body><form name="abc"><p>请输入第一个数字:<input type="text" width="60" name="text1"></p><p>请输入第二个数字:<input type="text" width="60" name="text2"></p><p>两个数字最大值为:<input type="text" width="60" name="text3"></p><p><input type="button" name="btmshow" value="输入"></button><input type="reset" name="reshow" value="重设"></p></form></body></html>====================================================例子3:在窗体中嵌入脚本代码以响应窗体中按钮的单击事件<HTML><HEAD><TITLE>测试按钮事件</TITLE></HEAD><BODY><FORM NAME="Form1"><INPUT TYPE="Button" NAME="Button1" VALUE="单击"><SCRIPT FOR="Button1" EVENT="onClick" LANGUAGE="VBScript">MsgBox "按钮被单击!"</SCRIPT></FORM></BODY></HTML>
-
青春有我
你好,其实很简单,这样做:在<header></header>标签中间加上这句:<script language="vbscript"></script>希望可以帮到您
-
三国纷争
<title>23</title><script type="text/vbscript">Function printa()document.getElementById("aa1").innerText=document.getElementById("aa").valuedocument.getElementById("bb1").innerText=document.getElementById("bb").valueend Function</script></head><body><input type="text" id="aa" value="111" name="aa"/><input type="text" id="bb" value="21" name="bb"/><button onClick="printa">点击我</button><div id=aa1></div><div id=bb1></div></body></html>
-
慕容3067478
1234567891011121314151617<head><title>23</title><script type="text/vbscript">Function printa() document.getElementById("aa1").innerText=document.getElementById("aa").value document.getElementById("bb1").innerText=document.getElementById("bb").valueend Function</script></head><body><input type="text" id="aa" value="111" name="aa"/><input type="text" id="bb" value="21" name="bb"/><button onClick="printa">点击我</button><div id=aa1></div><div id=bb1></div></body></html>