猿问

如何利用html网页,外部调用VBScript脚本?

如何利用html网页,外部调用VBScript脚本?


白猪掌柜的
浏览 961回答 4
4回答

FFIVE

例子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>

慕神8447489

你好,其实很简单,这样做:在<header></header>标签中间加上这句:<script language="vbscript"></script>希望可以帮到您

慕哥6287543

<title>23</title><script type="text/vbscript">Function printa()document.getElementById("aa1").innerText=document.getElementById("aa").valuedocument.getElementById("bb1").innerText=document.getElementById("bb").valueend&nbsp;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>

不负相思意

1234567891011121314151617<head><title>23</title><script&nbsp;type="text/vbscript">Function&nbsp;printa()&nbsp;&nbsp;&nbsp;document.getElementById("aa1").innerText=document.getElementById("aa").value&nbsp;&nbsp;&nbsp;document.getElementById("bb1").innerText=document.getElementById("bb").valueend&nbsp;Function</script></head><body><input&nbsp;type="text"&nbsp;id="aa"&nbsp;value="111"&nbsp;name="aa"/><input&nbsp;type="text"&nbsp;id="bb"&nbsp;value="21"&nbsp;name="bb"/><button&nbsp;onClick="printa">点击我</button><div&nbsp;id=aa1></div><div&nbsp;id=bb1></div></body></html>&nbsp;
随时随地看视频慕课网APP

相关分类

Html5
我要回答