通过js ,给页面的隐藏值赋值

来源:互联网 发布:2015国产耽美网络剧 编辑:程序博客网 时间:2024/06/08 02:06

//页面

<table>
<form name="paraForm">
    <input type="hidden" name="param"></span>
    <input type="hidden" name="type"></span>
    <input type="hidden" name="channelid"></span>
  </form>
</table>

 

// js

<script  language="javascript" type="text/javascript" >

function getResFunc(param,type,channelid){
    document.paraForm.param.value = param;        //将js参数param 赋值给隐藏对象
    document.paraForm.type.value = type;
    document.paraForm.channelid.value = channelid;
}

</script>