- <script>
- $(document).ready(function() {
- $('[id$=lnkBtn]').click(function() {
- $('[id$=TextBox1]').val("");
- return false;
- });
- });
- </script>
Another example of reset textbox is
<script type="text/javascript" src="../Scripts/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('[id$=lnkCancel]').click(function () {
$('[id$=txtFirstName]').val('');
$('[id$=txtLastname]').val('');
$('[id$=txtEmail]').val('');
$('[id$=txtPhone]').val('');
});
});
Reset the dropdownlist
$('select[id$=\'DropdownlistID\']').val(-1);
No comments:
Post a Comment