frame:通过鼠标拉动两个子页面的宽度

除了本文,还可以参考https://www.cnblogs.com/LT0314/p/3805393.html
1、只需要简单的frame标签即可实现鼠标拉动调整大小的效果:
<html>

<frameset cols="25%,50%,25%">
  <frame src="frame_a.htm" />
  <frame src="frame_b.htm" />
  <frame src="frame_c.htm" />
</frameset>

</html>

2、我在点击frameA中的链接,新页面在frameB中显示:
你可以在页面中设定frameB的name=“content”,然后在设定其中一个frameA的超链接<a target="content"></a>,就可以在frameB中打开超链接的内容

    <frameset cols="30%,70%"  >
        <frame src="${ctx }/admin/audit/projectSu/1" scrolling="no" />
        <frame name="content" />
    </frameset>
3、1)隐藏纵向、横向的滚动条:可以在frame中加 scrolling="no"

      2)只隐藏横向滚动条:在frame的包含页面里加入

 <style>
   html { overflow-x:hidden; }
 </style>
4、在frame里超链接到的新页面,并在整个页面显示,而不是仅仅显示在当前frame:

可以在超链接中指定 target属性,如果指定为_top,则是整个页面,也可以指定某个frame ,<a target="_top"> </a>

 
 
 
target="_blank":在新窗口中浏览新的页面。 
target="_self":在同一个窗口打开新的页面。 
target="_parent":在父窗口中打开新的页面。(页面中使用框架才有用) 
target="_top" :以整个浏览器作为窗口显示新页面。(突破了页面框架的限制)
 
 
 
5、整体思路: 

第一步:先访问controller ,跳转到framset jsp页面

	@RequestMapping("/project/{id}")
	public String auditProjectPage(Model model, @PathVariable("id") int id){
		model.addAttribute("id",id);
		return "check/test";
	}
第二步:jsp页面访问controller,返回新的frameA 的jsp页面
jsp:
%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/tag.jsp"%>
<!DOCTYPE html>
<html>
    <frameset cols="30%,70%"  >
        <frame src="${ctx }/admin/audit/projectSu/${id}" scrolling="no" />
        <frame name="content" />
    </frameset>
</html>
controller:
        @RequestMapping("/projectSu/{id}")
	public String auditProjectPageSu(Model model, @PathVariable("id") int id){
		ProjectExportItem projectExportItem = projecttExportService.extractProject(id);
		List<AuditRuleMenu> rules = flawItemService.extractAllRules(id);
		model.addAttribute("project",projectExportItem);
		model.addAttribute("rules",rules);
		model.addAttribute("title","检测结果");
		return "check/projectReview";

第三步:在frameA页面链接到的新页面在frameB中显示
<a target="content"></a>


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值