使用此代码,我们可以将单个值发送到搜索字段。现在,考虑到这个例子,我们如何使用相同的按钮按顺序插入更多值,例如:值1,值2,值3 ...?
http://jsfiddle.net/g506bxL4/1/
<form id="form1" name="form1" method="post">
<p>
<input type="button" name="set_Value" id="set_Value" value="submit" onclick="setValue()" />
</p>
<p>
<label>
<input type="text" name="bbb" id="bbb" />
</label>
</p>
</form>
<script type="text/javascript">
function setValue() {
document.getElementById('bbb').value = "valor 1";
}
</script>
白板的微信
慕斯709654
相关分类