日期:2014-05-17 浏览次数:20851 次
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Editor.aspx.cs" Inherits="xhEditor在线编辑器.Editor" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="Scripts/xhEditor/xheditor-1.2.1.min.js" type="text/javascript"></script>
<script src="Scripts/xhEditor/xheditor_lang/zh-cn.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
//初始化编辑器
$('#elem1').xheditor({ tools: 'full', width: '99.4%', height: '426px', forcePtag: false,
upBtnText: '上传', upMultiple: 1, upLinkUrl: 'upload.aspx',
upImgUrl: 'upload.aspx', upImgExt: 'jpg,jpeg,gif,png',
upFlashUrl: 'upload.aspx', upFlashExt: 'swf',
upMediaUrl: 'upload.aspx', upMediaExt: 'wmv,avi,wma,mp3,mid'
});
});
//存值
function setValue() {
$.ajax({
cache: false,
url: "upload.ashx",
data: { "text": $("#elem1").val() },
success: function (e) {
//alert("success");
window.location.href = "Success.aspx";
}
});
}
//取值
function getText() {
$.ajax({
cac