用vbscript,javascript编程语言怎么取的( )中的值

来源:百度知道 编辑:UC知道 时间:2024/07/09 01:07:45
用vbscript,javascript编程语言怎么取的( )中的值 我会给分的
先给10分 好的话回追加的

<script type=text/javascript>
function hello(name){
document.write("hello,"+name)
}
</script>
<input type=text id=yourname>
<input type=button onclick=hello(yourname.value)>

<script type=text/vbscript>
sub hello(name)
document.write("hello,"+name)
end sub
</script>
<input type=text id=yourname>
<input type=button onclick=hello(yourname.value)>

vbscript例子:
function Test(Byval TestString)
MsgBox TestString
End Function

javascript例子:
function Test(TestString)
{
alert( TestString );
}

是通过对应的ID号码取得其内容的,例如<input type=text name="test" >
如果在javascript中写var a=document.getElementById("test").value后,a就取得了这个文本框的值

( )是什么东西……参数吗……