1.Uploadify导致Chrome频繁崩溃Crash
以下为引用:(原文地址:http://www.cnblogs.com/fanyong/p/3894145.html)
Chrome浏览器为了提高用户访问同一页面的速度,会对页面数据进行缓存,当(Javascript文件)url请求地址不变时会导致浏览器不发送请求,直接从缓存中读取之前的数据,可能uploadify.js文件走了缓存,导致某个变量为null导致chrome崩溃
解决办法
根据stackoverflow上的帖子,给js文件加上随机参数,欺骗chrome浏览器防止缓存,使每次都发起请求。
<script type="text/javascript" src="${ctx }/js/uploadify/jquery.uploadify.min.js?ver=<%=new Date()%>"></script>
2.jQuery在iframe里取得父窗口的某个元素的值
原文地址(http://www.php100.com/html/program/jquery/2013/0905/5861.html)
1.在父窗口中获取指定iframe(testiframe) id 为 testid 的class
<span style="font-size:18px;">$(window.frames["testiframe"].document).find("#testid").attr('class');</span>
2.在IFRAME中获取父窗口中id为testid的class
<span style="font-size:18px;">$(window.parent.document).find("#testid").attr('class');</span>
iframe框架的:
<span style="font-size:18px;"><iframe src="test.html" id="testiframe" width="700" height="300" frameborder="0" scrolling="auto"></iframe></span>