87,923
社区成员
发帖
与我相关
我的任务
分享
<%
java.net.URL url = new java.net.URL("http://www.baidu.com/xxxx");
java.net.HttpURLConnection connection = (java.net.HttpURLConnection) url.openConnection();
connection.connect();
urlStream = connection.getInputStream();
java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.InputStreamReader(urlStream));
while ((line = reader.readLine()) != null)
{%>
<%=line%>
<%}%>
function SetWinHeight(obj)
{
var win=obj;
if (document.getElementById)
{
if (win && !window.opera)
{
if (win.contentDocument && win.contentDocument.body.offsetHeight)
win.height = win.contentDocument.body.offsetHeight;
else if(win.Document && win.Document.body.scrollHeight)
win.height = win.Document.body.scrollHeight;
}
}
}
//使用调用
//<iframe width="778" align="center" height="200" id="win" name="win" onload="Javascript:SetWinHeight(this)" frameborder="0" scrolling="no"></iframe>
<iframe id="treeinfo" name="treeinfo" src="treeinfo.html" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="0" onload="this.style.height=treeinfo.document.body.scrollHeight+5" scrolling="no">
</iframe>