defmode = "normalmode"; // default mode (normalmode, advmode, helpmode)
if (defmode == "advmode") {
helpmode = false;
normalmode = false;
advmode = true;
} else if (defmode == "helpmode") {
helpmode = true;
normalmode = false;
advmode = false;
} else {
helpmode = false;
normalmode = true;
advmode = false;
}
function chmode(swtch){
if (swtch == 1){
advmode = false;
normalmode = false;
helpmode = true;
alert(help_mode);
} else if (swtch == 0) {
helpmode = false;
normalmode = false;
advmode = true;
alert(adv_mode);
} else if (swtch == 2) {
helpmode = false;
advmode = false;
normalmode = true;
alert(normal_mode);
}
}
function AddText(NewCode) {
if(document.all){
insertAtCaret(document.input.message, NewCode);
setfocus();
} else{
document.input.message.value += NewCode;
setfocus();
}
}
function storeCaret (textEl){
if(textEl.createTextRange){
textEl.caretPos = document.selection.createRange().duplicate();
}
}
function insertAtCaret (textEl, text){
if (textEl.createTextRange && textEl.caretPos){
var caretPos = textEl.caretPos;
caretPos.text += caretPos.text.charAt(caretPos.text.length - 2) == ' ' ? text + ' ' : text;
} else if(textEl) {
textEl.value += text;
} else {
textEl.value = text;
}
}
function email() {
if (helpmode) {
alert(email_help);
} else if (document.selection && document.selection.type == "Text") {
var range = document.selection.createRange();
range.text = "[email]" + range.text + "[/email]";
} else if (advmode) {
AddTxt="[email] [/email]";
AddText(AddTxt);
} else {
txt2=prompt(email_normal,"");
if (txt2!=null) {
txt=prompt(email_normal_input,"name@domain.com");
if (txt!=null) {
if (txt2=="") {
AddTxt="[email]"+txt+"[/email]";
} else {
AddTxt="[email="+txt+"]"+txt2+"[/email]";
}
AddText(AddTxt);
}
}
}
}
function chsize(size) {
if (helpmode) {
alert(fontsize_help);
} else if (document.selection && document.selection.type == "Text") {
var range = document.selection.createRange();
range.text = "[size=" + size + "]" + range.text + "[/size]";
} else if (advmode) {
AddTxt="[size="+size+"] [/size]";
AddText(AddTxt);
} else {
txt=prompt(fontsize_normal,text_input);
if (txt!=null) {
AddTxt="[size="+size+"]"+txt;
AddText(AddTxt);
AddText("[/size]");
}
}
}
function chfont(font) {
if (helpmode){
alert(font_help);
} else if (document.selection && document.selection.type == "Text") {
var range = document.selection.createRange();
range.text = "[font=" + font + "]" + range.text + "[/font]";
} else if (advmode) {
AddTxt="[font="+font+"] [/font]";
AddText(AddTxt);
} else {
txt=prompt(font_normal,text_input);
if (txt!=null) {
AddTxt="[font="+font+"]"+txt;
AddText(AddTxt);
AddText("[/font]");
}
}
}
function bold() {
if (helpmode) {
alert(bold_help);
} else if (document.selection && document.selection.type == "Text") {
var range = document.selection.createRange();
range.text = "[b]" + range.text + "[/b]";
} else if (advmode) {
AddTxt="[b] [/b]";
AddText(AddTxt);
} else {
txt=prompt(bold_normal,text_input);
if (txt!=null) {
AddTxt="[b]"+txt;
AddText(AddTxt);
AddText("[/b]");
}
}
}
function italicize() {
if (helpmode) {
alert(italicize_help);
} else if (document.selection && document.selection.type == "Text") {
var range = document.selection.createRange();
range.text = "[i]" + range.text + "[/i]";
} else if (advmode) {
AddTxt="[i] [/i]";
AddText(AddTxt);
} else {
txt=prompt(italicize_normal,text_input);
if (txt!=null) {
AddTxt="[i]"+txt;
AddText(AddTxt);
AddText("[/i]");
}
}
}
function quote() {
if (helpmode){
alert(quote_help);
} else if (document.selection && document.selection.type == "Text") {
var range = document.selection.createRange();
range.text = "[quote]" + range.text + "[/quote]";
} else if (advmode) {
AddTxt="\r[quote]\r[/quote]";
AddText(AddTxt);
} else {
txt=prompt(quote_normal,text_input);
if(txt!=null) {
AddTxt="\r[quote]\r"+txt;
AddText(AddTxt);
AddText("\r[/quote]");
}
}
}
function chcolor(color) {
if (helpmode) {
alert(color_help);
} else if (document.selection && document.selection.type == "Text") {
var range = document.selection.createRange();
range.text = "[color=" + color + "]" + range.text + "[/color]";
} else if (advmode) {
AddTxt="[color="+color+"] [/color]";
AddText(AddTxt);
} else {
txt=prompt(color_normal,text_input);
if(txt!=null) {
AddTxt="[color="+color+"]"+txt;
AddText(AddTxt);
AddText("[/color]");
}
}
}
function center() {
if (helpmode) {
alert(center_help);
} else if (document.selection && document.selection.type == "Text") {
var range = document.selection.createRange();
range.text = "[align=center]" + range.text + "[/align]";
} else if (advmode) {
AddTxt="[align=center] [/align]";
AddText(AddTxt);
} else {
txt=prompt(center_normal,text_input);
if (txt!=null) {
AddTxt="\r[align=center]"+txt;
AddText(AddTxt);
AddText("[/align]");
}
}
}
function hyperlink() {
if (helpmode) {
alert(link_help);
} else if (advmode) {
AddTxt="[url] [/url]";
AddText(AddTxt);
} else {
txt2=prompt(link_normal,"");
if (txt2!=null) {
txt=prompt(link_normal_input,"http://");
if (txt!=null) {
if (txt2=="") {
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
小型个人博客系统下载 (330个子文件)
admincp.asp 84KB
function.asp 23KB
forumpost.asp 23KB
ubbcode.asp 23KB
blogedit.asp 22KB
forumedit.asp 22KB
library.asp 20KB
photoshow.asp 20KB
blogpost.asp 19KB
blogview.asp 17KB
photoedit.asp 17KB
guestbook.asp 17KB
TagsSearch.asp 16KB
commond.asp 14KB
default.asp 14KB
threadview.asp 13KB
member.asp 13KB
download.asp 11KB
bloglisttag.asp 11KB
blogvisit.asp 10KB
activeuser.asp 10KB
forummisc.asp 10KB
md5code.asp 10KB
downledit.asp 9KB
blogcomm.asp 9KB
register.asp 8KB
trackback.asp 8KB
photoadd.asp 7KB
forumview.asp 7KB
attachment.asp 6KB
index.asp 6KB
index.asp 6KB
observer.asp 5KB
inc.asp 5KB
photo.asp 5KB
favorite.asp 5KB
attachment_e.asp 5KB
commlist.asp 5KB
logging.asp 5KB
blognews.asp 4KB
bloglinks.asp 4KB
tblist.asp 4KB
search.asp 3KB
forumsearch.asp 3KB
postlist.asp 3KB
blogrss1.asp 3KB
ipview.asp 2KB
blogrss2.asp 2KB
header.asp 2KB
feeler.asp 2KB
conn.asp 2KB
syscore.asp 2KB
validatecode.asp 2KB
Tags.asp 2KB
down.asp 1KB
footer.asp 1KB
check_path.asp 775B
recache.asp 70B
blog_data 1.71MB
default.css 5KB
css.css 5KB
pr.css 1KB
style.css 443B
Thumbs.db 324KB
Thumbs.db 261KB
Thumbs.db 50KB
Thumbs.db 40KB
Thumbs.db 40KB
Thumbs.db 29KB
Thumbs.db 24KB
Thumbs.db 18KB
Thumbs.db 17KB
Thumbs.db 17KB
Thumbs.db 13KB
Thumbs.db 13KB
Thumbs.db 12KB
Thumbs.db 8KB
Thumbs.db 7KB
Thumbs.db 6KB
validatebody.fix 3KB
validatehead.fix 54B
zwo3_23.gif 61KB
rizhik.gif 20KB
nonpreview.gif 5KB
topurl_green.gif 2KB
MONTH10.gif 1KB
MONTH12.gif 1KB
MONTH8.gif 1KB
MONTH9.gif 1KB
MONTH3.gif 1KB
bar_bg_mid.gif 1KB
MONTH6.gif 1KB
MONTH11.gif 1KB
MONTH2.gif 1KB
MONTH5.gif 1KB
bb_rm.gif 1KB
MONTH4.gif 1KB
bb_light.gif 1KB
MONTH7.gif 1KB
bg_thisday.gif 980B
共 330 条
- 1
- 2
- 3
- 4
mojiasunfly
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0