getElementsByName 的严重问题 getElementsByName(id)[0] 就1个 那就是[0] 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 //这样吗?<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title></head><body><input type="text" name="test" /><script type="text/javascript">var text = document.getElementsByName("textArea");if(text instanceof Array);{ return text;}else{ var array = new Array(); array.push(text); return array;}</script></body></html> javascript学习中遇到的问题 这段IE专用代码什么意思? 如何获取跨域iFrame内容 JS问题...关于显示表格的问题 请问用JS如何判断客户端已安装上网助手呢? replace替换字符串出错了,求帮忙~~~ 如何把javascript的变量传递到vbscript中? 如何实现记录下焦点光标的位置然后在恢复? 类似 MSDN、CSDN 左边导航树效果的实现! [JavaScript + ASP] JSP、PHP 同理! 一个新问题!!~~~ 我要问个问题,问题如下: 怎么利用JS将img的图片保存到本地
//这样吗?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<input type="text" name="test" />
<script type="text/javascript">
var text = document.getElementsByName("textArea");
if(text instanceof Array);
{
return text;
}
else
{
var array = new Array();
array.push(text);
return array;
}
</script>
</body>
</html>