首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

javascript如何给文本框赋值

2013-02-19 
javascript怎么给文本框赋值?input typetext idreportInfo_file namereportInfo_file value${

javascript怎么给文本框赋值?
<input type="text" id="reportInfo_file" name="reportInfo_file" value="${reportInfo.file}"/>

现在我要通过JavaScript给这个文本框赋值,按照正常的赋值方式例如:

$("#reportInfo_file").attr("value","123");

传到后台时将reportInfo.file将变为空值,请教各位大神,有什么好的解决方法么? javascript Java?web' java?web
[解决办法]
$("#reportInfo_file").val(123);
[解决办法]
jquery的赋值用
$("#reportinfo_file").val(123);

热点排行