62,046
社区成员
发帖
与我相关
我的任务
分享
function click()
{
var tt = $find("txt1").value;
SimpleWebService.Sayhello(tt,qq);
}
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>未命名頁面</title>
<script type="text/javascript">
function pageLoad() {
}
function Button1_onclick() {
var tt=document.getElementById("txt1").value;
alert(tt);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
</div>
<input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
<input id="txt1" type="text" />
</form>
</body>
</html>
1.var str=document.getElementById("txt1").value
2.var str=$find("txt1").value;