Clear text field value in JQuery

前端 未结 15 1487
情书的邮戳
情书的邮戳 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:14

    Use jQuery.prototype.val to get/set field values:

    var value = $('#doc_title').val();    // get value
    $('#doc_title').val('');    // clear value
    

提交回复
热议问题