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);对不起,打错了,代码应该如上.
解决方案 »
- js弹出窗口设置
- 整个页面用 javascript 禁用了右键和选择功能,现在想让一个 id 为textbox1文本框内容可以选择和右键,请问该怎么写?实在是没分了啊,谢谢啊
- 不用FSO,能够获取文件大小吗?非文件图片!
- 怎么实现禁止托拽某一个文件进入我的web页面
- JS二维数组,怎么样删除其中一行,比如像C#的Remove
- 求正则匹配windows本地文件路径是否合法的js
- 请问,在javascript中如何释放内存?
- 怎么去的一个下拉列(框)表的所有值?
- 奇怪的问题!!!
- 关于窗口跳转的问题,请高手们看过来,急!!!
- 在线编辑功能遇到问题!
- 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>