12 2016 档案

摘要://去除空格 String.prototype.Trim = function() { return this.replace(/\s+/g, ""); } //去除换行 function ClearBr(key) { key = key.replace(/<\/?.+?>/g,""); key = 阅读全文
posted @ 2016-12-20 10:57 xiaoxiao333 阅读(16577) 评论(0) 推荐(0)
摘要:<iframe src="backtop.html" frameborder="0" scrolling="no" id="test" onload="this.height=100"></iframe> <script type="text/javascript"> function reinit 阅读全文
posted @ 2016-12-16 17:21 xiaoxiao333 阅读(123) 评论(0) 推荐(0)
摘要:跨域的时候,由于js的同源策略,父页面内的js不能获取到iframe页面的高度。需要一个页面来做代理。方法如下:假设www.a.com下的一个页面a.html要包含www.b.com下的一个页面c.html。我们使用www.a.com下的另一个页面agent.html来做代理,通过它获取iframe 阅读全文
posted @ 2016-12-16 17:20 xiaoxiao333 阅读(563) 评论(0) 推荐(0)