標籤:style blog http io color os ar java sp
問題背景:
之前用友言的時候改過網站的ip地址,改成127開頭的了。但是協同開發的時候別人用的還是localhost。
結果在用評論的時候iframe死活不能自適應,看了一下原始碼v9本身已經寫過iframe自適應的方法,而且在之前那個項目中一點兒問題都沒有。
那麼問題來了,到底咋回事?
問題線索:
在firebug控制台中無意發現報了一個錯,說js.html找不到,而js.html的地址是localhost開頭的
js.html是v9JS站群跨域的一個檔案(不知道啥意思),在v9根目錄
下面是代碼:
<html><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><head><title>V9 JS站群跨域</title></head><body onload="a()"><script type="text/javascript">function a(){ var q = location.search.replace(‘?‘,‘‘).split(‘|‘); if (top.document.getElementById(‘comment_iframe‘)) top.document.getElementById(‘comment_iframe‘).height=(q[0] ? q[0] : ‘0‘); if (top.document.getElementById(‘comment‘)) top.document.getElementById(‘comment‘).innerHTML=(q[1] ? q[1] : ‘0‘);}</script></body></html>
問題解決:
發現js.html裡面用到了comment_iframe,也就是那個評論iframe,所以把路徑改回localhost,OK了!
phpcms評論框iframe無法自適應問題