jQuery复选框问题 在.NET中,有如下控件:<asp:CheckBox ID="CbStart" runat="server" CssClass="ckb"/>要求用JQ实现,当选中以上复选框时,调用JQ函数,并获取当前控件的ID值,将当前控件设为未选中状态。急用 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <asp:CheckBox ID="CbStart" runat="server" CssClass="ckb" onclick='change()'/><script>function change(){ alert($(this).attr('id'));$(this).attr('disabled','disabled');}</script>试试。。别忘了导入jquery库 这样获取不到控件的值,“undefined” <asp:CheckBox ID="CbStart" runat="server" CssClass="ckb" onclick='change(this)'/><script>function change(obj){ alert($(obj).attr('id'));$(obj).attr('disabled','disabled');}</script> <asp:CheckBox ID="CbStart" runat="server" CssClass="ckb" onclick='change(this)'/><script>function change(obj){ alert($(obj).attr('id'));$(obj).removeAttr('checked');}</script> 在JQ或JS里怎么调用后台带参的函数。 <script type="text/javascript"> $(function(){ $("[id$=CbStart]").click(function(){ if($(this).attr("checked") == true) { //$(this).attr("id"); 这是ID } else { //用$.ajax方法调用.cs文件方法,下面有方法示例 } }); }); </script>http://www.cnblogs.com/zhongweiv/archive/2011/10/29/JqueryCallBack.html <asp:CheckBox ID="CbStart" runat="server" />$(function () { $("#<%=CbStart.ClientID %>").click(function () { alert($(this).attr("id")); $(this).attr("checked", !$(this).attr("checked")); });});在JQ或JS里怎么调用后台带参的函数。用Ajax调用HttpHandler或者asmx 这种页面一般是怎么做的 图片验证码的换一张的功能怎么实现?????? 文件选择框打开以后怎么设置文件类型? 如何用javascript制作页面打开loading条!请讲下原理即可,不用代码 select取值及传值问题 这是什么编码 ? 该死的木马 请给我一个网页的例子:屏幕上有一个Menu,鼠标放上去,正个菜单从屏幕外面进来。。 javascript写注册表的问题 图像转换 element.addEventListener不执行 脚本该如何写!!! 怎么JQuery的.focus()不好使?
<script>
function change(){
alert($(this).attr('id'));
$(this).attr('disabled','disabled');
}
</script>
试试。。别忘了导入jquery库
这样获取不到控件的值,“undefined”
<script>
function change(obj){
alert($(obj).attr('id'));
$(obj).attr('disabled','disabled');
}
</script>
<script>
function change(obj){
alert($(obj).attr('id'));
$(obj).removeAttr('checked');
}
</script>
<script type="text/javascript">
$(function(){
$("[id$=CbStart]").click(function(){
if($(this).attr("checked") == true)
{
//$(this).attr("id"); 这是ID
}
else
{
//用$.ajax方法调用.cs文件方法,下面有方法示例
}
});
});
</script>http://www.cnblogs.com/zhongweiv/archive/2011/10/29/JqueryCallBack.html
$(function () {
$("#<%=CbStart.ClientID %>").click(function () {
alert($(this).attr("id"));
$(this).attr("checked", !$(this).attr("checked"));
});
});
在JQ或JS里怎么调用后台带参的函数。
用Ajax调用HttpHandler或者asmx