jQuery: Select all readonly input type textbox
In this short post, find jQuery code to select all readonly input type textboxes present on the page. $(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(""); […]