Jquery 取文本问题. <td>sss<input type="hidden" value="aaa"/></td>怎么取sss 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <table> <tr> <td>sss<input type="hidden" value="aaa"/></td> </tr></table><script type="text/javascript"> var textVal = $('td')[0].firstChild.nodeValue; console.log(textVal);</script> <!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> <title></title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script></head><body> <table> <tr> <td> sss<input type="hidden" value="aaa" /> </td> </tr> </table> <script type="text/javascript"> var textVal = $('td')[0].firstChild.nodeValue; alert(textVal.trim()); </script></body></html> js 里面没有console.log要用alert 用JS模拟一个fixed的效果,但是ie和chrome下闪厉害,求解决办法 jquery使用Draggable,实现拖动层问题 求助:点击一个图片 弹出一个可以让用户选择路径的对话框,并把路径保存到一个文本框中 关于这个星座JavaScript 如何自动关闭某个页面? 有一个怪问题弄了,请高手看一下 IE发难,大伙帮忙,打印问题 如何获得页面上所有的select下拉框? 子窗体问题 请教:使用JavaScript将特定的字符串写入一个文件,并保存到指定目录 使用javascript实现隐藏和显示的问题 一个获取json返回值的问题
<table>
<tr>
<td>sss<input type="hidden" value="aaa"/></td>
</tr>
</table>
<script type="text/javascript">
var textVal = $('td')[0].firstChild.nodeValue;
console.log(textVal);
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
</head>
<body>
<table>
<tr>
<td>
sss<input type="hidden" value="aaa" />
</td>
</tr>
</table>
<script type="text/javascript">
var textVal = $('td')[0].firstChild.nodeValue;
alert(textVal.trim());
</script>
</body>
</html>