// JavaScript Document
//为String 对象添加trim()方法
String.prototype.trim=function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
//检查表单
function checkPost()
{
if(document.post.content.value.trim().length==0)
{
alert("帖子正文不能为空!\n请填写完全......");
document.post.content.focus();
return false;
}
if(document.post.content.value.length>600)
{
alert("您的帖子正文字节数为"+document.post.content.value.length+"\n正文长度请控制在600字节以下");
document.post.content.focus();
return false;
}
return true;
}
//检查编辑区域范围内有多少字节
function checkLength()
{
alert("您的文章目前共有 "+document.post.content.value.length+" 字节");
}
//UBB自动添加函数
function addBold()
{
var post=prompt("输入要加粗的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[b]"+post+"[/b]";
}
}
function addEm()
{
var post=prompt("输入要倾斜的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[i]"+post+"[/i]";
}
}
function addCenter()
{
var post=prompt("输入要居中显示的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[center]"+post+"[/center]";
}
}
function addLeft()
{
var post=prompt("输入要左对齐的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[left]"+post+"[/left]";
}
}
function addRight()
{
var post=prompt("输入要右对齐的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[right]"+post+"[/right]";
}
}
function addimages()
{
var post=prompt("请输入完整的图片链接地址\n比如http://www.systra.com.cn/logo.gif","完整的地址");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[img]"+post+"[/img]";
}
}
function addURL()
{
var post=prompt("请输入完整的地址\n比如http://www.systra.com.cn","完整的地址");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[url]"+post+"[/url]";
}
}
function addEmail()
{
var post=prompt("请输入完整的邮件地址\n比如[email protected]","完整的地址");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[email]"+post+"[/email]";
}
}
function addQuote()
{
var post=prompt("请输入引用的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[quote]"+post+"[/quote]";
}
}
function setFont(font)
{
var post=prompt("请输入想改变字体的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[font="+font+"]"+post+"[/font]";
}
}
function setSize(size)
{
var post=prompt("请输入想改变大小的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[size="+size+"]"+post+"[/size]";
}
}
function setColor(color)
{
var post=prompt("文字染色","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"["+color+"]"+post+"[/"+color+"]";
}
}
function addMood(mood)
{
document.post.content.value=document.post.content.value+mood;
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
[聊天留言]时空留言本v1.0_jspskygbook10.zip (191个子文件)
readme.chm 30KB
UbbCode.class 6KB
FaceFilter.class 2KB
FileUtil.class 2KB
DBConnection.class 2KB
HTMLFilter.class 1KB
13.gif 7KB
9.gif 6KB
4.gif 6KB
15.gif 6KB
11.gif 6KB
5.gif 6KB
12.gif 5KB
14.gif 5KB
35.gif 5KB
2.gif 5KB
7.gif 4KB
1.gif 4KB
6.gif 4KB
11.gif 4KB
3.gif 4KB
19.gif 4KB
8.gif 4KB
10.gif 3KB
26.gif 3KB
09.gif 3KB
06.gif 3KB
07.gif 2KB
24.gif 2KB
18.gif 2KB
08.gif 2KB
32.gif 2KB
42.gif 2KB
29.gif 2KB
25.gif 2KB
08.gif 2KB
01.gif 2KB
04.gif 2KB
67.gif 2KB
perinfo.gif 2KB
09.gif 2KB
lwcontent.gif 2KB
00.gif 2KB
53.gif 2KB
27.gif 2KB
34.gif 2KB
12.gif 2KB
small_13.gif 2KB
pagetitle2_.gif 2KB
33.gif 2KB
small_11.gif 2KB
23.gif 2KB
10.gif 2KB
small_9.gif 2KB
small_12.gif 2KB
59.gif 2KB
60.gif 2KB
14.gif 2KB
small_15.gif 2KB
small_2.gif 2KB
small_5.gif 2KB
small_4.gif 2KB
21.gif 2KB
page_index.gif 2KB
05.gif 2KB
small_14.gif 2KB
39.gif 2KB
31.gif 2KB
22.gif 2KB
02.gif 1KB
page_admin.gif 1KB
small_6.gif 1KB
small_10.gif 1KB
13.gif 1KB
small_7.gif 1KB
03.gif 1KB
small_1.gif 1KB
page_search.gif 1KB
38.gif 1KB
small_8.gif 1KB
56.gif 1KB
20.gif 1KB
small_3.gif 1KB
01.gif 1KB
28.gif 1KB
url1.gif 1KB
78.gif 1KB
43.gif 1KB
66.gif 1KB
16.gif 1KB
79.gif 1KB
17.gif 1KB
15.gif 1KB
30.gif 1KB
77.gif 1KB
76.gif 1KB
error.gif 1KB
face02.gif 1KB
face05.gif 1KB
51.gif 1KB
共 191 条
- 1
- 2
资源评论
芝麻粒儿
- 粉丝: 6w+
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功