使用jQuery为Property Disabled设置值时,它会在代码中出错吗? [英] While setting value for Property Disabled using jQuery it gives error in code behind?
本文介绍了使用jQuery为Property Disabled设置值时,它会在代码中出错吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$('#<%=txtPODate.ClientID%>').val(SupplierPOs[i].PODate);
$("#<%=txtPODate.ClientID%>").prop('disabled', true);<code></code>
此处后面的代码无法访问PODate文本框。
here PODate textbox is not accessible in the code behind .
推荐答案
( #<%= txtPODate.ClientID%>')。val(SupplierPOs [i] .PODate);
('#<%=txtPODate.ClientID%>').val(SupplierPOs[i].PODate);
( #<%= txtPODate.ClientID%>)。prop(' disabled', true );< code> < / code >
("#<%=txtPODate.ClientID%>").prop('disabled', true);<code></code>
此处后面的代码无法访问PODate文本框。
here PODate textbox is not accessible in the code behind .
这是因为表单中的禁用输入元素将不会被提交。 http://www.w3schools.com/tags/att_input_disabled.asp [ ^ ]
That is because disabled input elements in a form will not be submitted. http://www.w3schools.com/tags/att_input_disabled.asp[^]
这篇关于使用jQuery为Property Disabled设置值时,它会在代码中出错吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文