用 document.getElementById("xxxx").value="somethind"; xxxx不显示somethind
点击画面的select,更新入力框的内容,一直不能显示 somethind,一直空白。但是alert得内容是"somethind";
这个动作是在弹出画面做的。
function test(value){
document.getElementById("dmmonye1").value="somethind";
alert(document.getElementById("dmmonye1").value);
}
下面是弹出画面代码,用的是 模态框
<div class="modal fade" id="myModal1_{$a.activity_id}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body" style="margin-top:50px;">
<div style="width: 800px;text-align:center;height:30px">
<label style="color: #fff;font-size: 14px;width:105px;height:30px;margin-left:0px;font-family: '微软雅黑';">选择申请:</label>
<if condition="$a.handsel_id neq '' ">
<select name="handsel_id" id="handsel_id_{$a.activity_id}" style="margin-left:0;width:200px;height:30px;" onchange="test(this)"> >
<foreach name="a['handsel']" item='d'>
<option value="{$d.handsel_id}_{$d.money}_{$d.dmmoney}" >{$d.handsel_name}----{$d.money}</option>
</foreach>
</select>
<else/>
<input type="text" name="money" value="" style="margin-left:0px;width:200px;height:30px"/>
</if>
<label style="color: #fff;font-size: 14px;width:43px;height:29px;margin-left:20px;font-family: '微软雅黑';">tianqi:</label>
<input type="text" id="money1" name="money" style="margin-left:0px;width:100px;height:30px;"/>
<label style="color: #fff;font-size: 14px;width:55px;height:29px;margin-left:20px;font-family: '微软雅黑';">aaaaa:</label>
<input type="text" id="dmmonye1" name="money" value="" style="margin-left:0px;width:100px;height:30px;"/>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>