fckeditor配置
<!DOCTYPE html>
<html >
<head>
<title>发布</title>
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1" />
<link href="../../../css/jquerymobile/jquery.mobile-1.3.2.min.css" rel="stylesheet" type="text/css" />
<script src="../../../js/jquery.js" type="text/javascript"></script>
<script src="../../../js/jquerymobile/jquery.mobile-1.3.2.js" type="text/javascript"></script>
<script src="../../../fckeditor/fckeditor.js" type="text/javascript"></script> <style type="text/css">
p{ padding:0px; margin:0px}
</style> <script type="text/javascript">
$(document).bind('pagebeforechange', function (e, data) {
if (typeof data.toPage !== "string") {
var url = e.target.baseURI;
var o = getUrlParam(url);
window.localStorage.setItem("local_artid", o.id); getArt(o.id);
}
}); $(function () {
$("#btnSend").click(function () {
saveMyArt();
});
$("input[type='checkbox']").bind('click', function () {
if ($(this).prop("checked")) {
$(this).attr("checked", true).checkboxradio("refresh");
} else {
$(this).attr("checked", false).checkboxradio("refresh");
}
});
})
function getUrlParam(string) {
var obj = {};
if (string.indexOf("?") != -) {
var string = string.substr(string.indexOf("?") + );
var strs = string.split("&");
for (var i = ; i < strs.length; i++) {
var tempArr = strs[i].split("=");
obj[tempArr[]] = unescape(tempArr[]);
}
}
return obj;
}
function getArt(id) {
$.ajax({
url: "../../service/salesarts.ashx",
type: "POST",
dataType: "json",
data: "artid=" + id + "&method=getartbyartid&arttype=2",
success: function (data) {
var s = "";
$.each(data.ds, function (index, content) {
$("#title").text(content.Topic);
$("#artcontent").html(content.ArtContent);
window.localStorage.setItem("local_keyword",content.KeyWord);
})
}
});
}
function saveMyArt() {
var result=;
var artid=window.localStorage.getItem("local_artid");
var disid=window.localStorage.getItem("local_disid");
var disno = window.localStorage.getItem("local_disno");
var sendstatus = ;
var title = $("#topic").val();
var topic = "";
if (title == "") {
topic = $("#title").text();
} else {
topic = title;
}
var keyword = window.localStorage.getItem("local_keyword");
var artcontent = $("#artcontent").html(); if ($("#IsSales").prop("checked") == true) {
result = ;
}
var issales=result;
if ($("#IsProduct").prop("checked") == true) {
result=;
}
var isproduct=result;
if ($("#IsContact").prop("checked") == true) {
result=;
}
var iscontact=result;
if ($("#IsOrder").prop("checked") == true) {
result=;
}
var isorder = result; $.ajax({
url: "../../service/salesarts.ashx",
type:"POST",
dataType:"text",
data: "artid=" + artid + "&disid=" + disid + "&disno=" + disno + "&topic=" + topic + "&keyword=" + keyword + "&sendstatus=" + sendstatus + "&artcontent=" + escape(artcontent) + "&issales=" + issales + "&isproduct=" + isproduct + "&iscontact=" + iscontact + "&isorder=" + isorder + "&method=savemyart&arttype=2",
success:function(data){
//data:1保存成功 2发布成功 0失败
if(data=="true"){
alert("发布成功!");
window.location.href = "list.html"
}else{
alert("发布失败");
}
}
});
}
</script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<p>
<a href="../../member/member.html" data-role="button" data-inline="true">会员主页</a>
<a href="../../member/contact.html" data-role="button" data-inline="true">联系客户</a>
<a href="../../member/login.html" data-role="button" data-inline="true"> 退出</a>
</p>
</div>
<form id="form1">
<div data-role="content">
<div data-role="fieldcontain">
<span>原标题</span>
<label id="title"></label>
</div>
<div data-role="fieldcontain">
<input type="text" id="topic" placeholder="新标题" />
</div>
<div data-role="fieldcontain">
<script type="text/javascript">
var oFCKeditor = new FCKeditor('FCKeditor1');
oFCKeditor.BasePath = "/fckeditor/";
oFCKeditor.Create();
</script>
</div>
<div data-role="fieldcontain" data-type="horizontal">
<label><input type="checkbox" name="IsSales" id="IsSales" data-mini="true" />营销信息</label>
<label><input type="checkbox" name="IsProduct" id="IsProduct" data-mini="true" />产品信息</label>
<label><input type="checkbox" name="IsContact" id="IsContact" data-mini="true" />联系信息</label>
<label><input type="checkbox" name="IsOrder" id="IsOrder" data-mini="true" />订购信息</label>
</div>
<div data-role="fieldcontain">
<input type="button" id="btnSend" value="发布" />
</div> </div>
</form>
</div>
</body>
</html>
fckeditor配置的更多相关文章
- 在线富文本编辑器FckEditor配置(.Net Framework 3.5)
进入FCKeditor文件夹,编辑 fckconfig.js 文件.1.上传设置 . var _FileBrowserLanguage = 'php' ; // a ...
- fckeditor 配置
因为下载下来的压缩包里面有包含很多在我们使用时,用不到的,不删除也行.看个人喜好下面以PHP为例,进行程序瘦身 删除所有”_”开头的文件和文件夹 删除FCKeditor的目录下: fckedi ...
- FCKeditor配置与使用
fckeditor - (1)资料介绍与安装 fckeditor介绍 FCKeditor是一个专门使用在网页上属于开放源代码的所见即所得文字编辑器. 1.fckeditor官网:http://ww ...
- FckEditor 配置手册中文教程详细说明
http://www.jb51.net/article/17965.htm 首先,FCKEDITOR的性能是非常好的,用户只需很少的时间就可以载入 FCKEDITOR所需文件.对于其他在线编辑器来说, ...
- fckeditor配置详解
使用配置设置: . FCKConfig.CustomConfigurationsPath = '' ; // 自定义配置文件路径和名称 . FCKConfigFCKConfig.EditorAreaC ...
- JavaWEB开发时FCKeditor类似office界面的ajax框架,加入后就能做界面类似office,能进行简单的文本编辑操作+配置手册...
2019独角兽企业重金招聘Python工程师标准>>> FCKeditor是一款功能强大的开源在线文本编辑器(DHTML editor),它使你在web上可以使用类似微软Word 的 ...
- asp.net文本编辑器(FCKeditor)
FCKeditor介绍 FCKeditor是一个功能强大支持所见即所得功能的文本编辑器,可以为用户提供微软office软件一样的在线文档编辑服务.它不需要安装任何形式的客户端,兼容绝大多数主流浏览器, ...
- FCKEDITOR在.NET中的使用
FCKEDITOR在.NET中的使用 FCKeditor介绍 FCKeditor是一个功能强大支持所见即所得功能的文本编辑器,可以为用户提供微软office软件一样的在线文档编辑服务.它不需要安装任何 ...
- FCKeditor jsp配置
FCKeditor jsp配置 FCKeditor是sourceforge.net上面的一个开源项目,主要是实现在线网页编辑器的功能,可以让web程序拥有如MS Word这样强大的编辑功能.官方网站为 ...
随机推荐
- ActiveMQ使用例子
网上收集的例子:有broker,producer,consumer public class MqApp { public static void main(String[] args) throws ...
- virtualenv 运行python 解决依赖冲突问题 尤其是django那种蛋疼的版本问题
Create a python virtual environment and install python dependencies. cd evalai virtualenv venv sourc ...
- Weblogic服务端请求伪造漏洞(SSRF)和反射型跨站请求伪造漏洞(CSS)修复教程
一.服务端请求伪造漏洞 服务端请求伪造(Server-Side Request Forgery),是指Web服务提供从用户指定的URL读取数据并展示功能又未对用户输入的URL进行过滤,导致攻击者可借助 ...
- vsftpd更新和修改版本号教程
1.rpm包更新 类似以下更新即可 rpm -Uvh vsftpd--.el6.x86_64.rpm 2.源码更新 不懂为什么对于新版本可能只有源码包而没有rpm等包,如此只能以源码更新了. .tar ...
- JavaScript应用于asp开发场景
JavaScript应用于asp开发场景 演示代码示例: <%Path="../"%> <!--#include file="../../Inc/Con ...
- Win10系列:VC++ 定时器
计时器机制俗称"心跳",表示以特定的频率持续触发特定事件和执行特定程序的机制.在开发Windows应用商店应用的过程中,可以使用定义在Windows::UI::Xaml命名空间中的 ...
- 整数中1出现的次数(1~n)
题目描述 求出1~13的整数中1出现的次数,并算出100~1300的整数中1出现的次数?为此他特别数了一下1~13中包含1的数字有1.10.11.12.13因此共出现6次,但是对于后面问题他就没辙了. ...
- django 中下载文件与下载保存为excel
一.django 中下载文件 在实际的项目中很多时候需要用到下载功能,如导excel.pdf或者文件下载,当然你可以使用web服务自己搭建可以用于下载的资源服务器,如nginx,这里我们主要介绍dja ...
- PC/FORTH 判定
body, table{font-family: 微软雅黑} table{border-collapse: collapse; border: solid gray; border-width: 2p ...
- (Java学习笔记) Java Threading (Java线程)
Java Threading (Java线程) ● Process & Thread Processes are the abstraction of running programs: A ...