发布于 2016-08-18 03:35:22 | 102 次阅读 | 评论: 0 | 来源: 网友投递
JSP JAVA公司的WEB开发编程语言
JSP全名为Java Server Pages - java服务器页面是由Sun Microsystems公司倡导、许多公司参与一起建立的一种动态网页技术标准。JSP技术有点类似ASP技术,它是在传统的网页HTML(标准通用标记语言的子集)文件(*.htm,*.html)中插入Java程序段(Scriptlet)和JSP标记(tag),从而形成JSP文件,后缀名为(*.jsp)。
以下操作写在body里面,form表单外
<iframe id="agentFrame" name="agentFrame" src="" width="0" height="0" style="display:none;" ></iframe>
<script type="text/javascript">
function sethash(){
hashH = document.documentElement.scrollHeight; //获取自身高度
urlC = "/test.jsp"; //设置iframeA的src
document.getElementById("agentFrame").src=urlC+"#"+hashH; //将高度作为参数传递
}
window.onload=sethash;
</script>
test.jsp如下:
<%@ page contentType="text/html;charset=GBK" language="java"%>
<script>
function pseth() {
var iObj = parent.parent.document.getElementById('infoFrame');
iObjH = parent.parent.frames["infoFrame"].frames["agentFrame"].location.hash;
iObj.style.height = iObjH.split("#")[1]+"px";
}
window.onload=pseth();
</script>