📄 getubb.js
字号:
<script language="javascript" >
helpstat = false;
stprompt = true;
basic = false;
function AddText(NewCode) { //填写字符串
myForm.Body.value+=NewCode
}
function bold() { //字体变粗
if (helpstat) {
alert("加粗标记\n使文本加粗.\n用法: <b>这是加粗的文字</b>");
} else if (basic) {
AddTxt="<b></b>";
AddText(AddTxt);
} else {
txt=prompt("文字将被变粗!\n用法: <b>这是加粗的文字</b>","文字");
if (txt!=null) {
AddTxt="<b>"+txt;
AddText(AddTxt);
AddTxt="</b>";
AddText(AddTxt);
}
}
}
function italicize() { //斜体
if (helpstat) {
alert("斜体标记\n使文本字体变为斜体.\n用法: <i>这是斜体字</i>");
} else if (basic) {
AddTxt="<i></i>";
AddText(AddTxt);
} else {
txt=prompt("文字将变斜体!\n用法: <i>这是斜体字</i>","文字");
if (txt!=null) {
AddTxt="<i>"+txt;
AddText(AddTxt);
AddTxt="</i>";
AddText(AddTxt);
}
}
}
function underline() { //下划线
if (helpstat) {
alert("下划线标记\n给文字加下划线.\n用法: <u>要加下划线的文字</u>");
} else if (basic) {
AddTxt="<u></u>";
AddText(AddTxt);
} else {
txt=prompt("下划线文字!\n用法: <u>要加下划线的文字</u>","文字");
if (txt!=null) {
AddTxt="<u>"+txt;
AddText(AddTxt);
AddTxt="</u>";
AddText(AddTxt);
}
}
}
function center() { //对齐方式
if (helpstat) {
alert("对齐标记\n使用这个标记, 可以使文本左对齐、居中、右对齐.\n用法: <div align=center|left|right>要对齐的文本</div>");
} else if (basic) {
AddTxt="<div align=center|left|right></div>";
AddText(AddTxt);
} else {
txt2=prompt("对齐样式\n输入 'center' 表示居中, 'left' 表示左对齐, 'right' 表示右对齐.","center");
while ((txt2!="") && (txt2!="center") && (txt2!="left") && (txt2!="right") && (txt2!=null)) {
txt2=prompt("错误!\n类型只能输入 'center' 、 'left' 或者 'right'.","");
}
txt=prompt("要对齐的文本!\n用法: <div align=center|left|right>要对齐的文本</div>","文本");
if (txt!=null) {
AddTxt="\r<div align="+txt2+">"+txt;
AddText(AddTxt);
AddTxt="</div>";
AddText(AddTxt);
}
}
}
function hyperlink() { //网址链接
if (helpstat) {
alert("超级链接标记\n插入一个超级链接标记\n使用方法: <a href=http://www.aspsky.net>http://www.aspsky.net</href>\nUSE: <a href=http://www.aspsky.net>链接文字</href>");
} else if (basic) {
AddTxt="<a href></herf>";
AddText(AddTxt);
} else {
txt2=prompt("链接文本显示.\n如果不想使用, 可以为空, 将只显示超级链接地址. ","");
if (txt2!=null) {
txt=prompt("超级链接.\n使用方法: <a href=http://www.aspsky.net>http://www.aspsky.net</url>\nUSE: <a href=http://www.aspsky.net>链接文字</href>","http://");
if (txt!=null) {
if (txt2=="") {
AddTxt="<a href"+txt;
AddText(AddTxt);
AddTxt="></url>";
AddText(AddTxt);
} else {
AddTxt="<a href="+txt+">"+txt2;
AddText(AddTxt);
AddTxt="</href>";
AddText(AddTxt);
}
}
}
}
}
function email() { //EMAIL
if (helpstat) {
alert("Email 标记\n插入 Email 超级链接\n用法1: <a href=mailto:>nobody@domain.com</href>\n用法2: <a href=mailto:nobody@domain.com>佚名</email>");
} else if (basic) {
AddTxt="<email></email>";
AddText(AddTxt);
} else {
txt2=prompt("链接显示的文字.\n如果为空,那么将只显示你的 Email 地址","");
if (txt2!=null) {
txt=prompt("Email 地址!用法1: <a href=mailto:>nobody@domain.com</email>\n用法2: <a href=mailto:nobody@domain.com>佚名</email>","name@domain.com");
if (txt!=null) {
if (txt2=="") {
AddTxt="<a href=mailto:>"+txt+"</href>";
} else {
AddTxt="<a href=mailto:"+txt+">"+txt2;
AddText(AddTxt);
AddTxt="</href>";
}
AddText(AddTxt);
}
}
}
}
function image() { //图像连接
if (helpstat){
alert("图片标记\n插入图片\n用法: <img src=http://www.cnpg.com/logo.gif>");
} else if (basic) {
AddTxt="<img src=>";
AddText(AddTxt);
} else {
txt=prompt("图片的 URL!\n用法: <img>http://www.cnpg.com/logo.gif</img>","http://");
if(txt!=null) {
AddTxt="\r<img src="+txt;
AddText(AddTxt);
AddTxt=">";
AddText(AddTxt);
}
}
}
function flash() { //Flash
if (helpstat){
alert("Flash 动画\n插入 Flash 动画.\n用法: <flash>Flash 文件的地址</flash>");
} else if (basic) {
AddTxt="<flash></flash>";
AddText(AddTxt);
} else {
txt=prompt("Flash 文件的地址!\n用法: <EMBED src=Flash 文件的地址 width=128 height=128></embed>","http://");
if (txt!=null) {
AddTxt="<EMBED src="+txt;
AddText(AddTxt);
AddTxt=" width=200 height=200></embed>";
AddText(AddTxt);
}
}
}
function Cdir() { //插入 Shockwave 动画
if (helpstat){
alert("Shockwave 动画\n插入 Shockwave 动画.\n用法: <EMBED src=Shockwave 文件的地址 width=400 height=300></embed>");
} else if (basic) {
AddTxt="<dir></dir>";
AddText(AddTxt);
} else {
txt=prompt("Shockwave 文件的地址!\n用法: <EMBED src=Shockwave 文件的地址 width=500 height=350></embed>","");
if (txt!=null) {
AddTxt="<EMBED src="+txt;
AddText(AddTxt);
AddTxt=" width=400 height=300></embed>";
AddText(AddTxt);
}
}
}
function Crm() { // 插入 real player 文件
if (helpstat){
alert("real player 文件\n插入 real player 文件.\n用法: <EMBED src=real player 文件的地址 width=500 height=350></embed>");
} else if (basic) {
AddTxt="<rm></rm>";
AddText(AddTxt);
} else {
txt=prompt("real player 文件的地址\n用法: <rm=500,350>real player 文件的地址</rm>","");
if (txt!=null) {
AddTxt="<EMBED src="+txt;
AddText(AddTxt);
AddTxt=" width=400,height=300></embed>";
AddText(AddTxt);
}
}
}
function Cwmv() { // 插入 wmv 文件
if (helpstat){
alert("media player 文件\n插入 wmv 文件.\n用法: <EMBED src=media player 文件的地址 width=500 height=350></embed>");
} else if (basic) {
AddTxt="<mp></mp>";
AddText(AddTxt);
} else {
txt=prompt("media player 文件的地址\n用法: EMBED src=media player 文件的地址 width=500 height=350></embed>","http://");
if (txt!=null) {
AddTxt="<EMBED src="+txt;
AddText(AddTxt);
AddTxt=" width=400,height=300></embed>";
AddText(AddTxt)
}
}
}
function Cmov() { //插入 quick time 文件
if (helpstat){
alert("quick time 文件\n插入 quick time 文件.\n用法: <EMBED src=quick time 文件的地址 width=500 height=350></embed>");
} else if (basic) {
AddTxt="<qt></qt>";
AddText(AddTxt);
} else {
txt=prompt("quick time 文件的地址!\n用法: <EMBED src=quick time 文件的地址 width=500 height=350></embed>","");
if (txt!=null) {
AddTxt="<EMBED src="+txt;
AddText(AddTxt);
AddTxt=" width=400,height=300></embed>";
AddText(AddTxt)
}
}
}
function showcode() { //使用代码标记
if (helpstat) {
alert("代码标记\n使用代码标记,可以使你的程序代码里面的 html 等标志不会被破坏.\n使用方法:\n <code>这里是代码文字</code>");
} else if (basic) {
AddTxt="\r<code>\r</code>";
AddText(AddTxt);
} else {
txt=prompt("输入代码!\n使用方法:<code>这里是代码文字</code>","");
if (txt!=null) {
AddTxt="\r<code>"+txt;
AddText(AddTxt);
AddTxt="</code>";
AddText(AddTxt);
}
}
}
function quote() { //引用文字
if (helpstat){
alert("引用标记\n引用一些文字.\n用法: <quote>引用内容</quote>");
} else if (basic) {
AddTxt="<quote></quote>";
AddText(AddTxt);
} else {
txt=prompt("被引用的文字!\n用法: <quote>引用内容</quote>","文字");
if(txt!=null) {
AddTxt="<quote>"+txt;
AddText(AddTxt);
AddTxt="</quote>";
AddText(AddTxt);
}
}
}
function list() { //样式表
if (helpstat) {
alert("列表标记\n建造一个文字或则数字列表.\n\nUSE: <list> <*>项目一</*> <*>项目二</*> <*>项目三</*> </list>");
} else if (basic) {
AddTxt=" <list><*> </*><*> </*><*> </*></list>";
AddText(AddTxt);
} else {
txt=prompt("列表类型\n输入 'A' 表示有序列表, '1' 表示无序列表, 留空表示无序列表.","");
while ((txt!="") && (txt!="A") && (txt!="a") && (txt!="1") && (txt!=null)) {
txt=prompt("错误!\n类型只能输入 'A' 、 '1' 或者留空.","");
}
if (txt!=null) {
if (txt=="") {
AddTxt="<list>";
} else {
AddTxt="<list="+txt+">";
}
txt="1";
while ((txt!="") && (txt!=null)) {
txt=prompt("列表项\n空白表示结束列表","");
if (txt!="") {
AddTxt+="<*>"+txt+"</*>";
}
}
AddTxt+="</list> ";
AddText(AddTxt);
}
}
}
function setfly() { //飞行文字
if (helpstat){
alert("飞翔标记\n使文字飞行.\n用法: <fly>文字为这样文字</fly>");
} else if (basic) {
AddTxt="<fly></fly>";
AddText(AddTxt);
} else {
txt=prompt("飞翔文字!\n用法: <fly>文字为这样文字</fly>","文字");
if (txt!=null) {
AddTxt="<fly>"+txt;
AddText(AddTxt);
AddTxt="</fly>";
AddText(AddTxt);
}
}
}
function move() { // 使文字产生移动效
if (helpstat) {
alert("移动标记\n使文字产生移动效果.\n用法: <move>要产生移动效果的文字</move>");
} else if (basic) {
AddTxt="<move></move>";
AddText(AddTxt);
} else {
txt=prompt("要产生移动效果的文字!\n用法: <move>要产生移动效果的文字</move>","文字");
if (txt!=null) {
AddTxt="<move>"+txt;
AddText(AddTxt);
AddTxt="</move>";
AddText(AddTxt);
}
}
}
function glow() { //使文字产生光晕效果
if (helpstat) {
alert("光晕标记\n使文字产生光晕效果.\n用法: <GLOW=宽度, 颜色, 边界>要产生光晕效果的文字</GLOW>");
} else if (basic) {
AddTxt="<glow=255,red,2></glow>";
AddText(AddTxt);
} else {
txt2=prompt("文字的长度、颜色和边界大小","255,red,2");
if (txt2!=null) {
txt=prompt("要产生光晕效果的文字.","文字");
if (txt!=null) {
if (txt2=="") {
AddTxt="<glow=255,red,2>"+txt;
AddText(AddTxt);
AddTxt="</glow>";
AddText(AddTxt);
} else {
AddTxt="<glow="+txt2+">"+txt;
AddText(AddTxt);
AddTxt="</glow>";
AddText(AddTxt);
}
}
}
}
}
function shadow() { //使文字产生阴影效果
if (helpstat) {
alert("阴影标记\n使文字产生阴影效果.\n用法: <SHADOW=宽度, 颜色, 边界>要产生阴影效果的文字</SHADOW>");
} else if (basic) {
AddTxt="<SHADOW=255,blue,1></SHADOW>";
AddText(AddTxt);
} else {
txt2=prompt("文字的长度、颜色和边界大小!\n用法: <SHADOW=宽度, 颜色, 边界>要产生阴影效果的文字</SHADOW>","255,blue,1","系统提示");
if (txt2!=null) {
txt=prompt("要产生阴影效果的文字!\n用法: <SHADOW=宽度, 颜色, 边界>要产生阴影效果的文字</SHADOW>","文字","系统提示");
if (txt!=null) {
if (txt2=="") {
AddTxt="<SHADOW=255, blue, 1>"+txt;
AddText(AddTxt);
AddTxt="</SHADOW>";
AddText(AddTxt);
} else {
AddTxt="<SHADOW="+txt2+">"+txt;
AddText(AddTxt);
AddTxt="</SHADOW>";
AddText(AddTxt);
}
}
}
}
}
function music() { //加上背景音乐
if (helpstat) {
alert("背景音乐标记\n加上背景音乐.\n用法: <sound>这是背景音乐的网址</sound>");
} else if (basic) {
AddTxt="<sound></sound>";
AddText(AddTxt);
} else {
txt=prompt("加上背景音乐!\n用法: <sound>这是背景音乐的网址</sound>","http://");
if (txt!=null) {
AddTxt="<sound>"+txt;
AddText(AddTxt);
AddTxt="</sound>";
AddText(AddTxt);
}
}
}
function showfont(font) { //设置字体
if (helpstat){
alert("字体标记\n给文字设置字体.\n用法: <font face="+font+">改变文字字体为"+font+"</font>");
} else if (basic) {
AddTxt="<font face="+font+"></font>";
AddText(AddTxt);
} else {
txt=prompt("要设置字体的文字"+font,"文字");
if (txt!=null) {
AddTxt="<font face="+font+">"+txt;
AddText(AddTxt);
AddTxt="</font>";
AddText(AddTxt);
}
}
}
function showsize(size) { //设置文字大小
if (helpstat) {
alert("文字大小标记\n设置文字大小.\n可变范围 1 - 6.\n 1 为最小 6 为最大.\n用法: <font size="+size+">这是 "+size+" 文字</font>");
} else if (basic) {
AddTxt="<font size="+size+"></font>";
AddText(AddTxt);
} else {
txt=prompt("大小 "+size,"文字");
if (txt!=null) {
AddTxt="<font size="+size+">"+txt;
AddText(AddTxt);
AddTxt="</font>";
AddText(AddTxt);
}
}
}
function showcolor(color) { //设置字体颜色
if (helpstat) {
alert("颜色标记\n设置文本颜色. 任何颜色名都可以被使用.\n用法: <font color="+color+">颜色要改变为"+color+"的文字</font>");
} else if (basic) {
AddTxt="<font color="+color+"></font>";
AddText(AddTxt);
} else {
txt=prompt("选择的颜色是: "+color,"文字");
if(txt!=null) {
AddTxt="<font color="+color+">"+txt;
AddText(AddTxt);
AddTxt="</font>";
AddText(AddTxt);
}
}
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -