如果我添加runtat =" server"对于HTML控件jquery验证没有发生 [英] if i add runtat="server" to a html contrls jquery validations are not happening
本文介绍了如果我添加runtat =" server"对于HTML控件jquery验证没有发生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
基于html contlos ids当我使用时,Jquery会发生验证
或我将runtat =server添加到html控件,jquery,验证是否已停止
what我应该怎么做
Based on html contlos ids Validations happen in Jquery whenver i used
or i add runtat="server" to a html contrls,jquery, Validation are stoped
what should i do
推荐答案
如果你写runat =server那么那个html控件的行为就像一个服务器端控件,并且Id得到了改变。但是要获得服务器端在jquery中控制,它们的选择器必须改变。
这是一个带有runat =server的html控件,如
ex:<输入类型=文本id =txtnamerunat =server/>
那么你可以在jquery中得到这个控件,比如
var name =
If you write runat ="server" then that html control will behave like a server side control and there Id get changed.But to get server side control in jquery ,their selector has to change.
It is a html control with runat="server" like
ex: <input type="text" id="txtname" runat="server" />
then you can get this control in jquery like
var name=
([id
= txtname])。val()
或
var name =
=txtname]").val()
or
var name=
这篇关于如果我添加runtat =" server"对于HTML控件jquery验证没有发生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文