Home > Web Front-end > HTML Tutorial > 调用VBscript函数_html/css_WEB-ITnose

调用VBscript函数_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:35:15
Original
1257 people have browsed it

</HEAD>	<BODY>		<CENTER>			<H2>为student.xml创建属性</H2><HR>				<form id="XMLFILE">					请输入用户名:<INPUT	NAME="text1" TYPE="TEXT"><BR>					<BR><BR>					<INPUT type="BUTTON" value="查找" onclick="cnname_var(text1)">							</form>		    </CENTER>			<FONT COLOR="BLUE"><DIV id="message"></DIV></FONT><FONT COLOR="RED"><DIV id="msgcode"></DIV></FONT>					</BODY>
Copy after login


cnname_var 函数是用VBscript写的,如何把输入的文本传给cnname_var 函数,我上面这样写了,但好像一直没能传过去



function cnname_var (varusername)
MsgBox  varusername
显示的结果一直是 [object]?


回复讨论(解决方案)

onclick="cnname_var(text1.value)"
onclick='cnname_var(document.getElementById("text1").value)'
onclick="cnname_var(document.forms(0).text1.value)"
onclick="cnname_var(me.form.text1.value)"


onclick="cnname_var(text1.value)"
onclick='cnname_var(document.getElementById("text1").value)'
onclick="cnname_var(document.forms(0).text1.value)"
onclick="cnname_var(me.form.text1.value)"

都回答了若干版本快乐,我还有什么好回答的。
建议不用vbscript,vbscirpt是微软专利,其他浏览器有问题。
学习下jquery,要获取值就超级方便了

$("input[name='text1']").val();

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template