s5总决赛小组赛lgd打kt:VB脚本语言如下

来源:百度文库 编辑:神马品牌网 时间:2024/05/06 03:56:51
<SCRIPT LANGUAGE="VBScript"></SCRIPT>
<SCRIPT>
dim a,b,c

A=10

B=20

C=CStr(a)+CStr(b)

Msgbox c

</SCRIPT>

我想问的是,它是用一个窗口把C的结果显出来的,要怎么样才能直接显示在网页上的,不要新开一个窗口

<SCRIPT LANGUAGE="VBScript">
dim a,b,c
A=10
B=20
C=CStr(a)+CStr(b)
document.write (c)
</SCRIPT>

网页上放一个表单元素,比如文本框(名字为text1),然后代码里来一个
text1.value=c

不知道你需要的是不是这个

VBSCRIPT: ----------------------------------------

<body>
姓名:<input type="text" value="xbin0938" name="T3" size="18"><br>
性别:<input type="text" value="先生" name="T4" size="18"><br>
欢迎
<DIV ID="layer1" STYLE="position:absolute; visibility:visible">
<BR>
</DIV>
<SCRIPT LANGUAGE="vbSCRIPT">
C=CStr(t3.value)+CStr(t4.value)+"您的到来!"
sub play
call change_content("layer1",C)
end sub

sub change_content(divname, newtext)
document.all(divname).innerHTML = newtext
end sub

</SCRIPT>
<br>
<input type="button" value="按钮" name="B3" onClick="play()">
</body>

JAVASCRIPT:========================================

<SCRIPT LANGUAGE="JAVASCRIPT">

n = (document.layers) ? 1:0
ie = (document.all) ? 1:0
function change_content(divname, newtext) {
if (n) {
document.layers[divname].document.write(newtext)
document.layers[divname].document.close()
}
if (ie) document.all[divname].innerHTML = newtext
}

</SCRIPT>