jquery 属性选择器 取出页面中包含属性relatedId='firPer'的表单,页面表单有input,也有label。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我说的很明白了吧取出页面中包含属性relatedId="firPer"的所有表单。。 希望对楼主有用<html xmlns="http://www.w3.org/1999/xhtml"><head> <title></title> <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script></head><body> <form relatedid='firPer'> <input type="button" /> <input type="checkbox" /> <input type="file" /> </form> <select> <option>Option</option> </select> <textarea></textarea> <button> Button</button></body></html><script> //遍历relatedid='firPer'下面的表单元素,如果取值的话,同理可得 $("[relatedid='firPer'] >input").each(function () { alert($(this)[0].type); });</script> 在线急等 关于这个是不是jquery的bug问题。 Jquery大神们,怎么使点击二级菜单的时候滚动条不动? JS点击图片放大效果 如何用js调用web服务 急急急!!! 在线等! Object 属性问题 js自动添加闭合标签 js 能拿到mac地址 吗? 使用xmlhttp跨域访问时会弹出警告框:有安全危险,如何把这个警告框去掉? 如何在showModalDialog弹出的画面中打开CSV文件 用JavaScript调用广告代码为什么出不来呢?请帮忙看看这段简单的代码! 遨游的js选项卡绘制效果 如何使grid.reload()后,一个文本框得到焦点,并全选该文本框内的文本?
取出页面中包含属性relatedId="firPer"的所有表单。。
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
</head>
<body>
<form relatedid='firPer'>
<input type="button" />
<input type="checkbox" />
<input type="file" />
</form>
<select>
<option>Option</option>
</select>
<textarea></textarea>
<button>
Button</button>
</body>
</html>
<script>
//遍历relatedid='firPer'下面的表单元素,如果取值的话,同理可得
$("[relatedid='firPer'] >input").each(function () {
alert($(this)[0].type);
});
</script>