1、Ueditor 修改上传文件的格式类型:在ueditor/php/fileUp.php
"allowFiles" => array( ".rar" , ".doc" , ".docx" , ".zip" , ".pdf" , ".txt" , ".swf" , ".wmv",".xls" ) , //文件允许格式
2、
在网页中的
<textarea name="content" id="content" cols="50" rows="10" style="500px;height:320px"></textarea>
里面添加ueditor 编辑器
在网页头部添加js引用
<script type="text/javascript" src="templates/admin/ueditor/ueditor.all.js"></script>
在
<td><textarea name="content" id="content" cols="50" rows="10" style="500px;height:320px">{$content}</textarea>
<script type="text/javascript">
var editor = new UE.ui.Editor();
// editor.render("content");
UE.getEditor('content')
</script>
<br />
</td>
中添加javascript 把ueditor文件夹放入文件中。即可!
3、实现数据加载功能()
<html><head>
<meta charset="utf-8">
<title></title>
<script type="text/javascript" src="templates/default/sub/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="templates/default/sub/joyi_page.js"></script>
<script type="text/javascript" src="templates/default/tipswindow/tipswindown.js"></script>
<link href="templates/default/tipswindow/tipswindown.css" rel="stylesheet" type="text/css" />
<link href="templates/default/sub/page.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="page_box">
<ul class="news-items">
<li class="page_list"> no data. </li>
</ul>
<div id="pageInfo"></div>
</div>
<script language="JavaScript">
getInfo();
function getInfo() {
var ajaxUrl='templates/default/sub/getlist.php';
$('#pageInfo').joyiPage({
type: 'post',
url: ajaxUrl,
data: {pageIndex:1,pageSize:5,m:Math.random(),type:'01'},
infoTxt: '<li class="page_list"<a>暂无信息</a></li>',
contentBox: $('.news-items'), //返回数据呈现容器
dataFormat: _success, //格式化数据
callBack: function () {
//
}
});
}
function _success(json){
//var json=jQuery.parseJSON(json);//alert(typeof json);
var data= json.rows;
var html='';
for(var i in data){
html+='<li class="news-items-list"><span class="date">'+data[i].in_time+'</span>·<a title="'+data[i].subject+'" href="javascript:void();" onclick="pop('+data[i].annid+')";>'+data[i].subject+'</a><div style="display:none;" title="'+data[i].subject+'" id="content'+data[i].annid+'"">'+data[i].content+'</div></li>';
}
return html;
}
function pop(id)
{
var content=$('#content'+id).html();
var title=$('#content'+id).attr("title");
tipsWindown(title,"text:"+content,650,500,false);
//alert(content);
}
</script></body></html>