Clear text field value in JQuery

前端 未结 15 1435
情书的邮戳
情书的邮戳 2020-12-05 12:26

I understand this is an easy question but for some reason this just isn\'t working for me. I have a function that is triggered everytime a drop down menu is changed. Here

15条回答
  •  执笔经年
    2020-12-05 13:21

    If you are using jQuery, then you can use this:

    // var doc_val_check = $('#doc_title').val(); - No need of this!
    if ($('#doc_title').val().length > 0) {
        $('#doc_title').val("");
    }
    

提交回复
热议问题