11智能在线
新记
在javascript中怎么获取表单中的对象? document.getElementById(id); 此方法哪个字母需要大写
如题所述
举报该文章
相关建议 2013-12-15
<form name="from" actioin="#" method="post">
<input type="text" id="name" />
</form>
<script>
function getValue(){
var name = document.getElementById("name").value;//è·åid为nameçè¾å ¥æ¡çå¼
}
</script>
温馨提示:内容为网友见解,仅供参考
当前网址:
https://11.t2y.org/zz/42f448pq4fm8s78v7s.html
其他看法
第1个回答 2013-12-15
首先你的document.getElementById(id);是写正确了的,至于如何获取表单中的对象一般使用getElementByTagName方法,如有不明白的再问
相似回答
javascript获取
html
表单中的
值?
答:
javascript获取表单中的
值? 如获取form 表单下中的值 两种方法: 1、
document.getElementById(
"filename").value 2、document.form.filename.value lotus的表单中,通过
JavaScript获取表单中的
指定域值
?
js:document.forms[0].xx.value就可以了 xx为表单中的域的名称!
如何
用
js获取表单中的
...
大家正在搜
document对象的方法有哪些
javascript获取表单数据
document的对象方法
不属于document对象的方法
java的document对象
用javascript写表单代码
jquery获取form表单值
html document对象
document对象的属性有哪些
相关问题
在javascript中地document.geteleme...
javascript document.getElement...
Javascript中document.getelement...
js语言中document.getElementById("...
JS中document.getElementById("id...
在javascript里 获取表单 输入框的值时 为什么al...
javascript中document.getElement...
在js方法中用$('#but')获取不到对象,用docume...