现在的位置: 首页 > 综合 > 正文

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

2013年09月10日 ⁄ 综合 ⁄ 共 435字 ⁄ 字号 评论关闭

//页面

<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>

抱歉!评论已关闭.