jquery - 使用 JQuery 在 <div> 中加载 JSP 页面

标签 jquery html css

These are the two divs in my page

      #apDiv1 {
    position:absolute;
    left:0px;
    top:115px;
    width:100%;
    height:100%;
    z-index:4;
}
        #apDiv2 {
        position:relative;
    left:0px;
    top:0px;
    width:100%;
    height:100%;
    z-index:5;
}

where apDiv2 is nested in apDiv1 
<div id="apDiv1">
<div id="apDiv2" style="overflow:auto"></div>
</div>

what i wanna do is to load another page 'server_gen.jsp' in apDiv2 by using 

    $('#apDiv2').load('server_gen.jsp'); 
  • 页面正在按预期加载到 apDiv2 中……但问题是 “server_gen.jsp”页面元素未显示在 top in apDiv2 ...(我希望 server_gen.jsp 页面元素是 从 apDiv2 的 0px 显示)...我如何显示 server_gen.jsp apDiv2 的 to(即从 0px 开始)的元素?请帮忙

最佳答案

尝试在 #apDiv2 样式中添加 vertical-align: top;

关于jquery - 使用 JQuery 在 <div> 中加载 JSP 页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9835626/

相关文章:

javascript - 更改类以将其添加到链接

jquery - 将div从上到下对齐,然后从左到右对齐

HTML 5 颜色输入 : Define Custom Colors

javascript - 为什么导航选项卡和选项卡 Pane 不起作用?

javascript - 刷新时子窗口 onfocusout 事件不会触发

javascript - CKEditor 中的页眉和页脚模板

html - 将字体添加到网站

Javascript 继承 : How to

html - 基本的 css 字体粗细属性不起作用

html - 如何从 HTML 中删除 "Invisible space"