<!doctype?html>
<html>
?<head>
??<meta?charset="UTF-8">
??<meta?name="Generator"?content="EditPlus?">
??<meta?name="Author"?content="">
??<meta?name="Keywords"?content="">
??<meta?name="Description"?content="">
??<script?type="text/javascript"?src="jquery-1.11.1.js"></script>
??<script>
$(document).ready(function(){
//var?win=$(document.getElementById("#cp"));
var?win=$(window.frames["cp"].document).find("textarea").html();
alert(win);
});
??</script>
??<title>Document</title>
?</head>
?<frameset?id="aa"><frame?src="cha.html"?name="cp"?id="cp"></frame></frameset>
?<body>
?</body>
</html>頁面cha.html的文本域是有值的,但是讀不到,html()讀出來undefined,text()讀出來為空。到底問題出在哪呢,這些代碼我都是參考網(wǎng)上的,基本都嘗試過了,都不管用,求大神指點。
jquery獲取frame中節(jié)點的問題,大神幫忙看看
迷失代碼林
2017-09-20 08:47:29