请问在javascript中如何接收html的参数?
来源:百度知道 编辑:UC知道 时间:2024/05/11 13:46:15
接收html参数?FORM里的吗?
<form name="formname1" action="">
<input type="text" name="userName" id="username">
</form>
JS里用下面的方法取值:
document.formname1.userName.value
或document.getElementById("userName").value