summernote在IE的iframe中总是报参数无效的错误

qq_28567403 2015-09-14 09:30:18
写了一个东西用了summernote框架 一个基于bootstrap的html编辑器但是问题来了 我的项目为了图方便直接使用了iframe就是一边是菜单一边是工作区域,现在的情况是我在浏览器中敲入那个含有summernote的页面的地址,他显示正常,但是一旦这个东西进了iframeIE就会报错显示summernote参数无效。

在单独页面中正常

在iframe中不正常了

在IE中报的错 ,搞笑的是ff中一切正常
上代码

<%@ page language="java" import="java.util.*"
contentType="text/html;charset=utf-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>编辑内容</title>
<style>
form {
margin: 0;
}
textarea {
display: block;
}
.table{
margin-top: 50px;
margin-left:50px;
}
.pos{
width:100%;
height:20px;
border-bottom:dashed 1px #CDCDCD;
}
.pos_word{
font-size:12px;
height:16px;
}
.home_link{
height:15px;
margin-bottom:2px;
float:left;
}

.first_menu{
height:16px;
padding-top:1px;
margin:0px;
float:left;
}
.titleArea{
margin-left:0px;
padding-left:0px;
margin-bottom:10px;
width:90%;
}
.buttonArea{
text-align: center;
}
</style>

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap.min.css" rel="stylesheet">

<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet">
<script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.1/js/bootstrap.min.js"></script>
<!-- include summernote css/js-->
<link href="../../bootstrap/css/summernote.css" rel="stylesheet">
<script src="../../bootstrap/js/summernote.min.js"></script>
<script src="../../bootstrap/lang/summernote-zh-CN.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="../../bootstrap/js/html5shiv.js"></script>
<script src="../../bootstrap/js/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="pos">
<div class="pos_word"><div class="home_link"><img src="../../images/home.png"/></div><p class="first_menu"> > 修改内容 </p></div>
</div>
<div class="table">
<form action="../../userAction/postAction/updatePostMark" method="post" name="contentForm">
<div class="titleArea"><font style="font-size: 14px">标题:<input type="text" name="title" style="width:60%;" id="title" value="<s:property value='postMark.title'/>"/></font></div>
<div class="titleArea"><font style="font-size: 14px">内容:<div id="summernote"></div></font></div>
<div class="buttonArea"><input type="submit" value="提 交" style="margin: 10px;width:100px;height: 30px;margin-left: -100px"/></div>
</form>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#summernote').summernote({
height: 300,
lang: 'zh-CN'
});
$('#summernote').code("<s:property value='postMark.mainInfo' escape='false'/>");
});
</script>
</body>
</html>



...全文
163 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Go 旅城通票 2015-09-14
  • 打赏
  • 举报
回复
导入未压缩版的看具体错误行是什么,压缩版的没办法看错误是什么

87,915

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧