用JQuery怎么去一次性获取 aspTextBox 文本框的值
2024-09-14 18:38:08
如:
<asp:TextBox ID="txtSubject" runat="server">aa</asp:TextBox>
第一次用服务器控件,原来他就是和input标签一样 !
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script type="text/javascript" src="script/Jquery.js"></script>
<script type="text/javascript">
$(function () {
var str="";
var t1=document.getElementById("<%= TextBox1.ClientID").value;
var t2=$("#<%= TextBox1.ClientID%>").val();
alert(t1);
alert(t2);
})
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:TextBox ID="TextBox1" runat="server">sdf</asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server">sdf</asp:TextBox>
<asp:TextBox ID="TextBox3" runat="server">ee</asp:TextBox>
<asp:TextBox ID="TextBox4" runat="server">ee</asp:TextBox>
<asp:TextBox ID="TextBox5" runat="server">ee</asp:TextBox>
<input type="button" name="button" value="button"/>
</form>
</body>
</html>
最新文章
- 解决getElementsByClassName的兼容性问题
- Android Http请求
- C#输入输出重定向
- Codeforces 389A (最大公约数)
- IME 编程相关
- Android 时间格式的正则表达式
- 【风马一族_Android】手机与电脑通过adb进行连接
- 【Xamarin挖墙脚系列:使用Xamarin进行Hybrid应用开发】
- linux 命令c语言代码实现
- 朗科U903 低级格式化后,量产错误:read onlypage (控制器芯片群联2251-03)的解决方案
- MSSQL row_number简单使用语法
- 关于WM_ERASEBKGND和WM_PAINT的深刻理解
- Java I/O---概述
- Python 基础【二】 下
- 你不知道的JavaScript--Item4 基本类型和基本包装类型(引用类型)
- 服务消费者Feign和Ribbon的区别
- fzyzojP1635 -- 平均值
- numpy通用函数
- C++实现对文件中各单词词频的统计及其代码优化
- python之类和对象
热门文章
- Git笔记之初识vi编辑器
- 1_jenkins环境搭建
- 无线网卡在 MAC 系统下的安装与使用过程
- zip unzip tar 压缩解压
- scala中的高阶函数
- [Network Architecture]ResNext论文笔记(转)
- 【Network architecture】Rethinking the Inception Architecture for Computer Vision(inception-v3)论文解析
- 【网络结构】GoogLeNet inception-v1:Going deeper with convolutions论文笔记
- 【ML数学知识】极大似然估计
- 锁(3)-- DB锁