Change Placeholder Text using jQuery

后端 未结 13 1280
-上瘾入骨i
-上瘾入骨i 2020-12-04 06:17

I am using a jQuery placeholder plugin(https://github.com/danielstocks/jQuery-Placeholder). I need to change the placeholder text with the change in dropdown menu. But it is

13条回答
  •  执念已碎
    2020-12-04 06:50

    simply you can use

    $("#yourtextboxid").attr("placeholder", "variable");
    

    where, if variable is string then you can use like above, if it is variable replace it with the name like "variable" with out double quotes.

    eg: $("#youtextboxid").attr("placeholder", variable); it will work.

提交回复
热议问题