<tr>
<td width="30%" height="40" align="right">
<label id="namemsg" for="incoming_stock">Board Name </label>
</td>
<td align="left">
<input type="text" name="bName" id="bName" size="40" value="" class="inputbox required" maxlength="50" style="border: thin solid #C1C1C1; width: 235px;height: 40px;"/>
</td>
</tr>
function UpdateboardDetails(){
stocksubmit=true;
var boardId=document.getElementById("boardId").value;
var bName=document.getElementById("bName").value;
}
我正在尝试获取输入id:'bname'的值。但它显示为null。请帮忙
答案 0 :(得分:1)
如果您可以使用JQuery,请使用此
var boardId=$("#boardId").val();
var bName=$("#bName").val();