Question and answer is powered by AnsPress.io
I using codeigniter But i don’t know how to value null in select tag,
or select first value in the select tag, please help me.
How to value null in select tag or first value selected using jquery?
code here:
HTML:
<select name=”category” id=”cateid”>
<option value=””>Select Category</option>
<option value=”one”>Option ONE</option>
<option value=”two”>Option TWO</option>
</select>
jquery:
$(‘.#cateid’).val(“”);
Thak you.
$(‘#cateid’).val(“”);
here is cateid are select tag id.
like a
id=”cateid“