Introduction:
In this short post, find jQuery code to select all readonly input type textboxes present on the page.
Example:
$(function(){ $(":input[type=text][readonly='readonly']").val(""); });
However, if you have single readonly textbox element, then select it using its ID. And if you want to exclude all readonly input type textboxes from selection, then use below jQuery code.
$(function(){
$(":input[type=text]:not([readonly='readonly'])").val("");
});
The only difference is that ":not" selector is used to exclude readonly input type elements.
0 comments :
Post a Comment