好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

js中如何把一个获取的变量,放入到文本框中?_html/css_WEB-ITnose

function(data){
if(!data.flag){
$("#error1").html("该身份证对应账务账号可用")
var account_id = data.account;
$("#accountID").html(account_id);
}

//如何把account_id写入到文本中?我上面的做法好像是错误的!


回复讨论(解决方案)

文本框用val()

$("#accountID").val(account_id);

例如:

  


设置值得方式如下:
 $('#updateAirHiddenID').attr('value',“123132”); 

问题已经解决了就是使用的$("#accountID").val(account_id); 谢了!

查看更多关于js中如何把一个获取的变量,放入到文本框中?_html/css_WEB-ITnose的详细内容...

  阅读:27次