初学者请教!!! 为什么不直接alert(document.getElementById("dd").value); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html> <head> <script> <title> I'll go and quit my job in the freedom company!! </title> function ss() { alert(document.Form1.dd.value); } </script> </head> <body> <form id="Form1" method="post"> <input type="text" name="dd" id="dd" onblur="ss()"> </form> </body> </html> <html> <head> <script> <title> I'll go and quit my job in the freedom company!! </title> function ss() { alert(document.Form1.dd.value); } </script> </head> <body> <form id="Form1" method="post"> <input type="text" name="dd" id="dd" onblur="ss()"> </form> </body> </html> <input type="text" name="dd" id="dd" onblur="ss()"> 表单操作是用name而不是id的,只是ie能兼容两者所以很多时大家都忽略了。把form、input、textarea等的id都改为name是最好的。又或者用比较正道的操作方法如1楼的,又或者是document.forms[xxx].elements[xxxx].value <form id="Form1" name="Form1" method="post"> --FORM加name属性试试 表单处与文本框处都少了name属性<html> <head> <title> I'll go and quit my job in the freedom company!! </title> <script>function ss() { alert(document.Form1.dd.value); } </script> </head> <body> <form name="Form1" id="Form1" method="post"> <input type="text" name="dd" id="dd" onblur="ss()"> </form> </body> </html> 用document.form这种方法对于初学者来说会比较容易理解面向对象哦..用多了,其实都一样..最后出现问题不也就是算法 jquery操作样式的问题,望大虾指教 如何控制LI列表顺序排列和倒序排列? vs2003 treeview 用javascript 得不到一些值。 这些javascript是如何注入的?浏览器插件是怎么一回事 javascript可以实现类似php的一些功能吗? 求一导航菜单,急,谢谢! 关于label!高分 ,求助 初学,一个简单的问题 有没有Netscape的Javascript和Microsoft的Js语法区别的对照表? javascript的错误处理怎么写啊~!和JAVA一样么? 【求助】如何用JavaScript实现“打印目标”功能 jQuery 解析 xml
<html>
<head>
<script> <title> I'll go and quit my job in the freedom company!! </title>
function ss()
{
alert(document.Form1.dd.value);
} </script>
</head>
<body>
<form id="Form1" method="post">
<input type="text" name="dd" id="dd" onblur="ss()"> </form>
</body>
</html>
<html>
<head>
<script> <title> I'll go and quit my job in the freedom company!! </title>
function ss()
{
alert(document.Form1.dd.value);
} </script>
</head>
<body>
<form id="Form1" method="post">
<input type="text" name="dd" id="dd" onblur="ss()"> </form>
</body>
</html> <input type="text" name="dd" id="dd" onblur="ss()">
FORM加name属性试试
<html>
<head>
<title> I'll go and quit my job in the freedom company!! </title>
<script>
function ss()
{
alert(document.Form1.dd.value);
} </script>
</head>
<body>
<form name="Form1" id="Form1" method="post">
<input type="text" name="dd" id="dd" onblur="ss()"> </form>
</body>
</html>