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.form1.T_Content, NewCode);
setfocus();
} else{
document.form1.T_Content.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=="") {
没有合适的资源?快使用搜索试试~ 我知道了~
留言本的源代码(ASP)
共86个文件
jpg:30个
asp:24个
gif:23个
需积分: 12 69 下载量 91 浏览量
2008-10-08
11:18:40
上传
评论
收藏 271KB RAR 举报
温馨提示
一个用 ASP + Access 编写的简洁的留言本。
资源推荐
资源详情
资源评论
收起资源包目录
gb.rar (86个子文件)
gb
user_check.asp 609B
web_detail.asp 940B
userlogin.asp 1KB
modify_save.asp 916B
reply_save.asp 339B
SqlIn.mdb 128KB
copy.asp 1KB
image
Head.Fix 54B
a13.jpg 7KB
a10.jpg 7KB
b9.jpg 7KB
bg1.gif 47B
b11.jpg 8KB
add.gif 422B
a9.jpg 7KB
b2.jpg 7KB
b7.jpg 8KB
b1.jpg 7KB
b6.jpg 8KB
repost.gif 450B
b13.jpg 6KB
a1.jpg 8KB
a2.jpg 5KB
b8.jpg 6KB
a14.jpg 7KB
a7.jpg 8KB
a6.jpg 7KB
b5.jpg 7KB
b14.jpg 7KB
b10.jpg 7KB
a5.jpg 7KB
a15.jpg 7KB
body.Fix 3KB
bg.gif 530B
b4.jpg 7KB
re.gif 263B
a12.jpg 7KB
home.gif 441B
a4.jpg 6KB
a11.jpg 8KB
b12.jpg 7KB
ubbcode
bb_code.gif 277B
bb_wmv.gif 761B
bb_quote.gif 363B
bb_center.gif 256B
bb_url.gif 375B
bb_list.gif 646B
bb_email.gif 365B
bb_wma.gif 736B
bb_underline.gif 261B
bb_image.gif 296B
bb_italicize.gif 250B
bb_flash.gif 381B
bb_bold.gif 259B
del.gif 512B
a3.jpg 8KB
email.gif 452B
check.gif 83B
a8.jpg 7KB
b15.jpg 8KB
b3.jpg 8KB
call.gif 453B
Function.asp 6KB
inc
modify.js 989B
ubbhelp.js 3KB
myjs.js 506B
md5.asp 11KB
ubbcode.js 14KB
head.asp 8KB
conn.asp 257B
reply.asp 2KB
delete_message.asp 323B
sqlin.Asp 4KB
modifylogin.asp 1KB
cookies.asp 134B
modify.asp 4KB
css.css 740B
message_save.asp 1KB
user_logout.asp 71B
mydata.mdb 180KB
Inc_ubb.asp 5KB
top.asp 2KB
GetCode.asp 1KB
index.asp 12KB
ubbcode.asp 11KB
sqlinadmin.asp 13KB
共 86 条
- 1
资源评论
kane_zl
- 粉丝: 0
- 资源: 33
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功