Finding all inputs with a name attribute that contains 'vishal' and sets the value with some text.

vishalneeraj-24503
Posted by vishalneeraj-24503 under jQuery category on | Points: 40 | Views : 1122
<script src="//code.jquery.com/jquery-1.10.2.js"></script>

<input name="vishal_1" value="1" /><br />
<input name="vishal_2" value="1"/><br />
<input name="vishal_3" value="1"/><br />
<input name="vaishali" value="1"/><br />

<script>
$("input[name*='vishal']").val("yes vishal is present");
</script>

Comments or Responses

Login to post response