怎么样动态创建一个HIDDEN对象啊?~(硬着头皮还是要问,别扔砖!) <input type="hidden" name="ps"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 var oInput = document.createElement("option")oInput.type = "hidden";oInput.id = "hdn";document.body.appendChild(oInput);注: 未调试 sorry 写错了var oInput = document.createElement("input") //我晕oInput.type = "hidden";oInput.id = "hdn";document.body.appendChild(oInput); 调试通过,实在不好意思@_@<body></body><SCRIPT LANGUAGE="JavaScript"><!--var oInput = document.createElement("input")oInput.type = "hidden";oInput.id = "hdn";document.body.appendChild(oInput);alert(document.body.outerHTML);//--></SCRIPT> 学习document.createElement("input")发现javascript最有趣 http://eyun.iecn.net/tmp/upload参考一下这个页面,可以添加各种控件 LxcJie(肖冲*爱*捷捷) ========================不明白,你把input放那个form里呀?还有,怎么不指定value属性? value如果需要当然可以自己指定.. 如何使输入的<不变成< Style与currentStyle EXTJS 中 xtype : 'panel' 动态数据 怎么实现 请问下为什么图片或flash都不能显示呢?谢谢啦 数组的方法 问高手:JS如何实现像google首页搜索的效果 online[0]=1;问题 QQ,微博,淘宝登录,自定义图标的问题!!! 各位大虾---超级难题! promise 如何写这样的正则?[即给分] 聊天室列表 的一个问题
oInput.type = "hidden";
oInput.id = "hdn";
document.body.appendChild(oInput);注: 未调试
oInput.type = "hidden";
oInput.id = "hdn";
document.body.appendChild(oInput);
</body>
<SCRIPT LANGUAGE="JavaScript">
<!--
var oInput = document.createElement("input")
oInput.type = "hidden";
oInput.id = "hdn";
document.body.appendChild(oInput);
alert(document.body.outerHTML);
//-->
</SCRIPT>
发现javascript最有趣
参考一下这个页面,可以添加各种控件
========================
不明白,你把input放那个form里呀?还有,怎么不指定value属性?