改变placeholder的值
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script> </head> <body> <select name="menu1" id="sel"> <option selected value="">请选择</option> <option value="百度">百度</option> <option value="网易">网易</option> <option value="新浪">新浪</option> <option value="腾讯">腾讯</option> <input type="text" value="" name="get" id="get" placeholder="请下拉选择" disabled="disabled"> <script> $(document).ready(function () { $("#sel").change(function () { //alert(1); var a = $(this).val(); //alert(a); $("#get").val(a); $("#get").attr('placeholder',a); var b = $("#get").attr('placeholder'); alert("当前placeholder的值是:"+b); console.log("当前placeholder的值是:"+b); }); }); </script> </body> </html>