简体   繁体   中英

JQuery need to clear a text box when clicking calendar button

I have a textbox with calendar button. Here my requirement is I need to clear the text box when user clicks Calendar Image control. Please provide JQuery for this.

Thanks in advance.

Well the simple answer is:

$("#calendarButton").click(function(){    
   $("#yourTextBoxId").val('');
});

But if you want a more detailed solution I would suggest you post some sample code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM