var el=document.createElement("input");
el.type="text";
el.fctype="numeric";
el.id="customer_input";
document.body.appendChild(el);对不起,打错了,代码应该如上.
el.type="text";
el.fctype="numeric";
el.id="customer_input";
document.body.appendChild(el);对不起,打错了,代码应该如上.
解决方案 »
- JQuery form提交原文,回调函数在IE8中有的有反应,有的没反应,是为何?
- 取对象属性
- 求瀑布流源代码,类似蘑菇街(列式布局)
- 请问replace的问题??谢谢
- 帮忙解决下-- js给asp传值问题???
- 超级连接指向某页面参数的隐藏的处理
- 怎样引用javascript中的变量?
- 用frontpage2003打开js,里面的汉字全显示乱码???
- 这个效果怎么做???
- 请教各位怎样去掉<textarea>里的scrollbar
- 在线编辑功能遇到问题!
- showModelessDialog问题:在网站一里showModelessDialog一个网站二的文件,网站二怎么样读取网站一的页面变量?
=>
alert(document.getElementById("customer_input").getAttribute("fctype"));
el.id="customer_input";
getElementById("cutomer_input") //是不是少了一个s ??
也不行.
:)
下面的代码执行没问题;
或者试试 document.body.appendChild(el);=》document.appendChild(el);<html>
<body>
<script language="JavaScript">
var el=document.createElement("input");
el.type="text";
el.fctype="numeric";
el.id="customer_input";
document.body.appendChild(el);
alert(document.getElementById("customer_input").getAttribute("fctype"));
</script>
</body>
</html>