<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-label">机台</label>
<div class="col-sm-10">
<input type="text" class="form-control" list="test" id="jt" value='请选择' onfocus="this.value=''" />
<datalist id="test">
<option value="852">852</option>
<option value="553">553</option>
<option value="353">353</option>
<option value="352">352</option>
</datalist>
</div>
</div>
<script>
function addRow() {
//alert("开始_新增一条数据");//确认
var v_jt = document.getElementById('jt').value; //机台
//确认
alert("\r 机台:" + v_jt );
$.ajax({
url: "/web_page/Handler2_WriteDb.ashx",
type: "post",
async: false,
data: {
"RequestType": "inserted_Row",
"v_jt": v_jt,
},
success: function (data1, status) {
if (status == "success") {
//返回结果 data1指的是Handler2_WriteDb.ashx中的 string date1 = context.Request["v_rq"]; //日期
alert(data1);
}
},
error: function () {
alert('miss');
},
});
}
</script>
标签:function,jt,机台,bootstrap,alert,data1,下拉菜单 From: https://www.cnblogs.com/automationanywhere/p/17689499.html