亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? editor_utf-8.js

?? JSP(Java Server Pages)是由Sun Microsystems公司倡導、許多公司參與一起建立的一種動態網頁技術標準。 JSP技術是用JAVA語言作為腳本語言的
?? JS
字號:
/**
 * sLinkFieldName:相關的文本框名稱。 sInitMode:初始化模式。"CODE","EDIT","VIEW"。
 * sWebEditorName:編輯器名稱。
 */
Pn.Editor = function(config) {
	config = config || {};
	this.initConfig = config;
	Pn.apply(this, config);

	// 瀏覽器版本檢測
	this.BrowserInfo = new Object();
	this.BrowserInfo.majorVer = navigator.appVersion.match(/MSIE (.)/)[1];
	this.BrowserInfo.minorVer = navigator.appVersion.match(/MSIE .\.(.)/)[1];
	this.BrowserInfo.isIE55OrMore = this.BrowserInfo.majorVer >= 6
			|| (this.BrowserInfo.majorVer >= 5 && this.BrowserInfo.minorVer >= 5);

	// 當前模式
	this.sCurrMode = null;
	this.bEditMode = null;
	// 編輯器
	this.eWebEditor = document.frames[this.sWebEditorName];
	// 關聯的字段
	this.oLinkField = document.getElementsByName(this.sLinkFieldName)[0];
	var url = location.href;
	// 基本路徑
	this.sBaseUrl = url.substring(0,url.lastIndexOf('/')+1);
	// 縮放,百分比。
	this.nCurrZoomSize = 100;

	this.sContentFlag = "0";
	this.sContentEdit = "";
	this.sContentLoad = "";

	if (this.sContentFlag == "0") {
		this.sContentEdit = this.oLinkField.value;
		this.sContentLoad = this.oLinkField.value;
		this.sContentFlag = "1";
	}
	// 編輯器的模式及處理內容
	this.setMode(this.sInitMode);
	this.setLinkedField();
	var o = this;
	this.eWebEditor.document.body.onpaste = function(){return o.onPaste.call(o)};
}
// 改變模式:代碼、編輯、預覽
Pn.Editor.prototype.setMode = function(newMode) {
	if (newMode != this.sCurrMode) {
		var sBody = "";
		var msg = "";
		switch (this.sCurrMode) {
			case "CODE" :
				sBody = this.eWebEditor.document.body.innerText;
				break;
			case "EDIT" :
			case "VIEW" :
				sBody = this.eWebEditor.document.body.innerHTML;
				break;
			// 剛打開頁面
			default :
				sBody = this.sContentEdit;
				break;
		}
		// 更換狀態按鈕樣式。
		try {
			document.all[this.sWebEditorName + "_CODE"].className = "p-editor-statusbar-off";
			document.all[this.sWebEditorName + "_EDIT"].className = "p-editor-statusbar-off";
			document.all[this.sWebEditorName + "_VIEW"].className = "p-editor-statusbar-off";
			document.all[this.sWebEditorName + "_" + newMode].className = "p-editor-statusbar-on";
		} catch (e) {
		}
		// 換內容
		switch (newMode) {
			case "CODE" :
				this.eWebEditor.document.designMode = "On";
				this.eWebEditor.document.open();
				this.eWebEditor.document.write(this.styleEditorHeader);
				this.eWebEditor.document.body.innerText = sBody;
				this.eWebEditor.document.body.contentEditable = "true";
				this.eWebEditor.document.oncontextmenu = function(){return false};
				this.eWebEditor.document.close();
				this.bEditMode = false;
				break;
			case "EDIT" :
				this.eWebEditor.document.designMode = "On";
				this.eWebEditor.document.open();
				this.eWebEditor.document.write(this.styleEditorHeader);
				this.eWebEditor.document.body.innerHTML = sBody;
				this.eWebEditor.document.body.contentEditable = "true";
				this.eWebEditor.document.oncontextmenu = function(){return false};
				this.eWebEditor.document.execCommand("2D-Position", true, true);
				this.eWebEditor.document.execCommand("MultipleSelection", true,
						true);
				this.eWebEditor.document.execCommand("LiveResize", true, true);
				this.eWebEditor.document.close();
				this.doZoom(this.nCurrZoomSize);				
				var o = this;
				this.eWebEditor.document.body.onpaste = function(){return o.onPaste.call(o)};
				this.bEditMode = true;
				break;
			case "VIEW" :
				this.eWebEditor.document.designMode = "off";
				this.eWebEditor.document.open();
				this.eWebEditor.document.write(this.styleEditorHeader);
				this.eWebEditor.document.body.innerHTML = sBody;
				this.eWebEditor.document.body.contentEditable = "false";
				this.eWebEditor.document.close();
				this.bEditMode = false;
				break;
		}
		this.sCurrMode = newMode;
		// TODO
		/*
		 * disableChildren(eWebEditor_Toolbar);
		 * 
		 * if ((borderShown != "no") && bEditMode) { borderShown = "no";
		 * showBorders() }
		 */
	}
	// eWebEditor.focus();
}
/**
 * 縮放
 */
Pn.Editor.prototype.doZoom = function(size) {
	this.eWebEditor.document.body.runtimeStyle.zoom = size + "%";
	this.nCurrZoomSize = size;
}

// 設置所屬表單的提交或reset事件
Pn.Editor.prototype.setLinkedField = function(size) {
	if (!this.oLinkField) {
		return;
	}
	var oForm = this.oLinkField.form;
	if (!oForm) {
		return;
	}
	// 附加reset、submit事件
	var o = this;
	oForm.attachEvent("onreset", function(){o.attachReset.call(o)});
	oForm.attachEvent("onsubmit", function(){o.attachSubmit.call(o)});
}

// 附加Reset事件
Pn.Editor.prototype.attachReset = function() {
	if (!this.bEditMode) {
		this.setMode('EDIT');
	}
	if (this.bEditMode) {
		this.eWebEditor.document.body.innerHTML = this.sContentLoad;
	} else {
		this.eWebEditor.document.body.innerText = this.sContentLoad;
	}
}
// 附加Submit事件
Pn.Editor.prototype.attachSubmit = function() {
	var oForm = this.oLinkField.form;
	if (!oForm) {
		return;
	}
	var html = this.getHTML();
	this.sContentEdit = html;
	html = html.replace(/?/g, "•");
	if (this.sCurrMode == "TEXT") {
		html = this.htmlEncode(html);
	}
	if (this.oLinkField.value != null) {
		this.oLinkField.value = html;
	}
}
// 取編輯器的內容
Pn.Editor.prototype.getHTML = function() {
	var html;
	if (this.bEditMode) {
		html = this.eWebEditor.document.body.innerHTML;
	} else {
		html = this.eWebEditor.document.body.innerText;
	}
	var re = new RegExp(this.sBaseUrl.replace(/\//, "\/"), "gi");
	html = html.replace(re, "");
	if ((html.toLowerCase() == "<p>&nbsp;</p>")
			|| (html.toLowerCase() == "<p></p>")) {
		html = "";
	}
	return html;
}
// 替換特殊字符
Pn.Editor.prototype.htmlEncode = function(text) {
	text = text.replace(/&/g, "&amp;");
	text = text.replace(/"/g, "&quot;");
	text = text.replace(/</g, "&lt;");
	text = text.replace(/>/g, "&gt;");
	text = text.replace(/'/g, "&#146;");
	text = text.replace(/\ /g, "&nbsp;");
	text = text.replace(/\n/g, "<br/>");
	text = text.replace(/\t/g, "&nbsp;&nbsp;&nbsp;&nbsp;");
	return text;
}
// 格式化編輯器中的內容
Pn.Editor.prototype.format = function(what, opt) {
	if (!this.validateMode()) {
		return;
	}
	this.eWebEditor.focus();
	if (opt == "RemoveFormat") {
		what = opt;
		opt = null;
	}
	if (opt == null) {
		this.eWebEditor.document.execCommand(what);
	} else {
		this.eWebEditor.document.execCommand(what, "", opt);
	}
	this.eWebEditor.focus();
}
// 檢測當前是否允許編輯
Pn.Editor.prototype.validateMode = function() {
	if (this.bEditMode) {
		return true;
	}
	alert("需轉換為編輯狀態后才能使用編輯功能!");
	this.eWebEditor.focus();
	return false;
}
// 插入特殊對象
Pn.Editor.prototype.insert = function(what) {
	if (!this.validateMode()) {
		return;
	}
	this.eWebEditor.focus();
	var sel = this.eWebEditor.document.selection.createRange();
	switch (what) {
		// 插入分頁符
		case "page" :
			this.insertHTML("[NextPage]");
			break;
		// 插入換行符
		case "br" :
			this.insertHTML("<br/>");
			break;
		// 引用片段樣式
		case "quote" :
			this.insertHTML('<table width=95% border="0" align="Center" cellpadding="6" cellspacing="0" style="border: 1px Dotted #CCCCCC; TABLE-LAYOUT: fixed"><tr><td bgcolor=#F3F3F3 style="WORD-WRAP: break-word"><font style="color: #990000;font-weight:bold">以下是引用片段:</font><br>'
					+ HTMLEncode(sel.text) + '</td></tr></table>');
			break;
		// 字體變大
		case "big" :
			this.insertHTML("<big>" + sel.text + "</big>");
			break;
		// 字體變小
		case "small" :
			this.insertHTML("<small>" + sel.text + "</small>");
			break;
		default :
			alert("錯誤參數調用!");
			break;
	}
	sel = null;
}
// 顯示無模式對話框
Pn.Editor.prototype.showDialog = function(url, width, height, optValidate) {
	if (optValidate) {
		if (!this.validateMode()) {
			return;
		}
	}
	this.eWebEditor.focus();
	var arr = showModalDialog(url, this.eWebEditor, "dialogWidth:" + width
			+ "px;dialogHeight:" + height + "px;help:no;scroll:no;status:no");
	this.eWebEditor.focus();
}
// 在當前文檔位置插入.
Pn.Editor.prototype.insertHTML = function(html) {
	if (!this.validateMode()) return;
	if (this.eWebEditor.document.selection.type.toLowerCase() != "none")
		this.eWebEditor.document.selection.clear() ;
	this.eWebEditor.document.selection.createRange().pasteHTML(html) ; 
}
// 粘貼時自動檢測是否來源于Word格式
Pn.Editor.prototype.onPaste = function() {
	if (this.autoDetectPasteFromWord && this.BrowserInfo.isIE55OrMore) {
		var sHTML = this.getClipboardHTML();
		var re = /<\w[^>]* class="?MsoNormal"?/gi;
		if (re.test(sHTML)) {
			if (confirm("你要粘貼的內容好象是從Word中拷出來的,是否要先清除Word格式再粘貼?")) {
				this.cleanAndPaste(sHTML);
				return false;
			}
		}
	} else {
		return true;
	}
}

Pn.Editor.prototype.getClipboardHTML = function () {
	var oDiv = document.getElementById("eWebEditor_Temp_HTML");
	oDiv.innerHTML = "";
	var oTextRange = document.body.createTextRange();
	oTextRange.moveToElementText(oDiv);
	oTextRange.execCommand("Paste");
	var sData = oDiv.innerHTML;
	oDiv.innerHTML = "";
	return sData;
}

Pn.Editor.prototype.cleanAndPaste = function (html) {
	// Remove all SPAN tags
	html = html.replace(/<\/?span[^>]*>/gi, "");
	// Remove Class attributes
	html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3");
	// Remove Style attributes
	html = html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi, "<$1$3");
	// Remove Lang attributes
	html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3");
	// Remove XML elements and declarations
	html = html.replace(/<\\?\?xml[^>]*>/gi, "");
	// Remove Tags with XML namespace declarations: <o:p></o:p>
	html = html.replace(/<\/?\w+:[^>]*>/gi, "");
	// Replace the &nbsp;
	html = html.replace(/&nbsp;/, " ");
	// Transform <P> to <DIV>
	var re = new RegExp("(<p)([^>]*>.*?)(<\/p>)", "gi");
	// Different because of a IE 5.0 error
	html = html.replace(re, "<p$2</p>");
	this.insertHTML(html);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合一区二区| 99热精品国产| 亚洲乱码一区二区三区在线观看| 欧美怡红院视频| 国产成人免费网站| 三级久久三级久久| 中文字幕一区在线| 欧美成人一区二区| 欧洲在线/亚洲| 成人一区在线看| 九九国产精品视频| 午夜精品久久一牛影视| 亚洲欧美一区二区三区国产精品| 2022国产精品视频| 欧美肥妇bbw| 精品视频999| 91视频在线观看| 国产大陆亚洲精品国产| 免费成人av在线| 亚洲成人tv网| 亚洲精品中文在线观看| 国产精品污网站| 久久综合九色欧美综合狠狠 | 另类小说欧美激情| 樱花影视一区二区| 亚洲同性同志一二三专区| 久久精品视频免费| xfplay精品久久| 2021中文字幕一区亚洲| 精品国产乱码91久久久久久网站| 制服丝袜在线91| 欧美麻豆精品久久久久久| 91国在线观看| 欧洲人成人精品| 欧美性猛交xxxx黑人交| 欧美综合视频在线观看| 91国偷自产一区二区三区观看| 91免费在线播放| 色综合网色综合| 色狠狠一区二区| 一本到不卡精品视频在线观看| eeuss鲁一区二区三区| av亚洲产国偷v产偷v自拍| 高清在线成人网| 不卡视频一二三| 91免费观看在线| 日本精品免费观看高清观看| 欧美综合亚洲图片综合区| 欧洲一区在线观看| 91精品国产麻豆国产自产在线| 4hu四虎永久在线影院成人| 欧美日韩成人综合在线一区二区| 3d动漫精品啪啪| 精品久久久久香蕉网| www国产精品av| 国产精品乱码一区二区三区软件| 亚洲欧洲精品天堂一级 | 亚洲亚洲人成综合网络| 五月天网站亚洲| 狠狠色丁香婷综合久久| 国产成a人无v码亚洲福利| 91麻豆国产福利精品| 欧美私人免费视频| 日韩欧美综合在线| 国产欧美日韩综合精品一区二区| 中文字幕精品一区二区精品绿巨人| 亚洲精品视频在线观看免费| 亚洲成人激情社区| 精品中文字幕一区二区| 成人午夜电影久久影院| 在线精品视频免费播放| 91精品国产91热久久久做人人| 337p日本欧洲亚洲大胆精品| 亚洲精品乱码久久久久久日本蜜臀| 日韩成人dvd| 国产69精品久久777的优势| 91成人国产精品| 欧美sm美女调教| 国产精品久久久久久一区二区三区| 亚洲成人你懂的| 国产.精品.日韩.另类.中文.在线.播放| 一本大道久久a久久综合婷婷| 欧美一区二区三区男人的天堂| 久久精品视频在线看| 亚洲香蕉伊在人在线观| 国产成人午夜精品5599 | 中文字幕高清一区| 午夜视黄欧洲亚洲| 懂色av噜噜一区二区三区av| 在线欧美一区二区| 久久精品视频一区| 日本伊人色综合网| 91免费视频大全| 精品国产免费人成在线观看| 亚洲视频一二三| 国产一区二区三区电影在线观看| 91麻豆国产福利精品| 久久精品亚洲乱码伦伦中文 | 午夜精品福利久久久| 成人福利在线看| 日韩欧美在线影院| 一区二区三区**美女毛片| 国产精品一级片在线观看| 在线成人高清不卡| 亚洲乱码一区二区三区在线观看| 激情小说亚洲一区| 日韩一区二区三区观看| 一区二区三区蜜桃网| 国产a视频精品免费观看| 欧美一区二区福利在线| 亚洲综合免费观看高清完整版在线 | 国产精品福利影院| 狠狠色丁香婷婷综合久久片| 欧美剧在线免费观看网站| 亚洲欧洲国产日韩| 国产99精品国产| 久久精品在这里| 韩国av一区二区三区| 欧美一卡在线观看| 午夜视频一区在线观看| 欧美少妇bbb| 亚洲一卡二卡三卡四卡| 色八戒一区二区三区| 国产精品免费视频观看| 国产精品亚洲一区二区三区在线| 日韩欧美高清dvd碟片| 丝袜亚洲另类欧美综合| 欧美日韩黄色影视| 午夜精品福利视频网站| 欧美日韩一级视频| 亚洲国产视频在线| 欧美乱妇一区二区三区不卡视频| 夜夜精品视频一区二区 | 色天使久久综合网天天| 国产精品国产三级国产普通话三级| 国产成人亚洲综合色影视| 国产欧美一区二区三区沐欲| 国产精品2024| 国产精品乱人伦中文| 99国产欧美久久久精品| 亚洲精品久久7777| 欧美亚洲国产一区二区三区| 亚洲综合av网| 3d动漫精品啪啪| 精品一区二区在线视频| 久久久久久免费网| 高清国产一区二区| 亚洲欧洲日韩在线| 欧洲精品中文字幕| 天天色天天操综合| 欧美大度的电影原声| 国产精品白丝jk黑袜喷水| 欧美国产综合一区二区| 91视视频在线直接观看在线看网页在线看 | 91免费视频大全| 亚洲一区二区三区视频在线播放| 欧美美女直播网站| 久久成人免费日本黄色| 久久久久久久电影| 91网站视频在线观看| 亚洲一区电影777| 精品久久久久av影院 | 欧美一区二区三区婷婷月色| 久久国产欧美日韩精品| 国产丝袜美腿一区二区三区| 99国产精品一区| 日产国产高清一区二区三区| 欧美精品一区二| 色婷婷综合中文久久一本| 天堂一区二区在线| 亚洲国产精品精华液ab| 在线观看亚洲精品| 精品一区二区三区在线播放| 亚洲国产高清在线| 欧美高清视频一二三区| 国产精品原创巨作av| 一区二区三区欧美久久| 日韩美女一区二区三区| eeuss鲁片一区二区三区在线看| 调教+趴+乳夹+国产+精品| 国产日本亚洲高清| 欧美日韩免费高清一区色橹橹| 国产一区二区三区综合| 一区二区三区在线视频观看58| 欧美成人综合网站| 91福利社在线观看| 国产.欧美.日韩| 美女久久久精品| 亚洲精品乱码久久久久久| 精品成人一区二区三区四区| 91官网在线观看| 国产在线精品国自产拍免费| 亚洲一区视频在线| 欧美国产成人精品| 日韩精品在线网站| 色婷婷综合久久久久中文 | 欧美一区二区在线观看| 99久久精品免费| 激情综合色丁香一区二区| 一区二区三区波多野结衣在线观看|