js获取form表单所有数据
2021-05-12 09:30
标签:方法 join text col check nbsp form cti serial 代码如下: js获取form表单所有数据 标签:方法 join text col check nbsp form cti serial 原文地址:https://www.cnblogs.com/henuyuxiang/p/12010407.htmlbody>
form id="login" name="login" method="post" action="result.jsp">
input name="user" type="text"/>
input name="sex" type="radio" value="man"/>
input name="sex" type="radio" value="woman"/>
interest:input type="checkbox" name="interest" value="piu">PIU input type="checkbox" name="interest" value="dss">DSS input type="checkbox" name="interest" value="ddr">DDRbr>
input type="hidden" name="from" value="welcome">br>
input type="button" name="submit" value="submit" onclick="getFormInfo();">
form>
body>
function getFormInfo(){
var params = serializeForm(‘login‘);
alert(params);
}