I am using this JS to clear text box when user click on it, so this works fine and clears all the text box in the page, I want to clear only the search text box
Search..
How can I do that, Other text box should not be cleared and only this search text box should be cleared when I click on it.
<script type="text/javascript">
$(function () {
$('input[type=text]').focus(function () {
$(this).val('')
});
});
</script>
And another question.
I have a panel with few text box, how can i set focus on a particular text box
<asp:TextBox ID="txt_Name" runat="server" />
I think its not the best idea to use
idvalues since.netmight change theidvalue in runtimeyou can do something like this