如何获得IFrame编辑器中的内容,
jsp页面代码如下:<%@pagelanguage="java"import="java.util.*"pageEncoding="UTF-8"%><%Stringpat...
jsp 页面代码如下:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>hello</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="text/javascript" src="js/jquery-1.4.4.js"></script>
<script>
function gotoshowData()
{
}
</script>
</head>
<body onload="imgEditer.document.designMode='On';">
<IFrame id="imgEditer" width="100%" height="40%" marginheight="0px" marginheight="0px">
</IFrame>
<input type="button" value="显示" onclick="gotoshowData()"/>
</body>
</html>
==============
要求:点击显示按钮可以获得IFrame 编辑器中的文字; 展开
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>hello</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="text/javascript" src="js/jquery-1.4.4.js"></script>
<script>
function gotoshowData()
{
}
</script>
</head>
<body onload="imgEditer.document.designMode='On';">
<IFrame id="imgEditer" width="100%" height="40%" marginheight="0px" marginheight="0px">
</IFrame>
<input type="button" value="显示" onclick="gotoshowData()"/>
</body>
</html>
==============
要求:点击显示按钮可以获得IFrame 编辑器中的文字; 展开
1个回答
希奕际
2024-04-10 广告
2024-04-10 广告
剑桥文理与剑桥艺术学校中国 基于剑桥文理学校优质的海外校本部资源和课程方向,现开设四类课程:艺术与设计课程、音乐与戏剧课程、英国A-Level课程、波士顿文理中学美高与AP课程。荣获2021胡润百学中国国际学校艺术类领军学校奖,2022胡润...
点击进入详情页
本回答由希奕际提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询