Clear text area

后端 未结 11 1552
终归单人心
终归单人心 2020-12-01 06:04

In Onselect event I have script:

$(\"#vinanghinguyen_images_bbocde\").val(\'\');
$(\"#vinanghinguyen_images_bbocde\").val(vinanghinguyen_final_bbcode);
         


        
11条回答
  •  执念已碎
    2020-12-01 06:40

    I just tried using this code and @psynnott's answer was correct though I needed to know it would work repeatedly, seems to work with jquery 1.7.1 >

    I modified the jfiddle to the following http://jsfiddle.net/Rjj9v/109/

    $('#mytext').text('');
    

    This is not a new answer @psynnott is correct I am just providing a more concise example that shows the textarea is still working after the clear because if you use .val("") the text area stops working

提交回复
热议问题