新闻发布系统的最终问题,请看 把VBB的代码抄过来用就是啦.其实就是用js而已. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 pcdreama(峰幻) :你说的vbb代码那里有?我看看先!请告之,谢谢 就是VBB论坛啊.很多地方都有的.你要我mail给你吧.你email? 呵呵,谢谢了,我的email:[email protected] 对,很多论坛都有,不过也有很多是楼主说的那种,如果要实现像WORD一样的功能,我看单靠JS肯怕是不够的,当然,这是个人认为,pcdreama(峰幻)兄也给我一份吧,我倒想看看他是用什么写的! 哎,首先我还是要谢谢 pcdreama(峰幻) 给我的回复,多谢了,但……我还以为vbb是什么好程序呢,小弟我一直就认为它不怎么样,再加上小弟一直从事的是纯商业性,和政府性网站的制作,也从想用它,它里面的功能和我要求的太远了, pcdreama(峰幻) 您请看,如果你要添加一个粗体的汉字,你的操作步骤怎么样:1、点击那个“b” 按钮,2、在弹出的javascript的对话框中输入你要写的汉字,3、文本框中出现您好 而我的要求是,现在在文本框中已经有很多文字了,这时我选中其中的一些文字,然后点击“b”按钮,这时我选种的那段文字的开头和结尾处分别加上了<b>和</b>我的这要求是和vbb论坛完全不一样的,请教下各位高人,谢谢! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><body><textarea onChange="document.all.preview.innerHTML=this.value" cols="50" rows="10"></textarea><br>预览HERE:<br><span id=preview></span></body></html> 其实VBB中就是用的UBB代码,估计要想实现你所说的这种功能是不可能的。除非你在客户端安装上你自己设计的客户端软件估计是可以有办法实现的。本人关注这一话题 pcdreama朋友的这种方法中能够使用UBB代码吗?是不是必须使用HTML代码?现在的问题是客户他不会用HTML代码,如果用JS往上写HTML代码,好象不行,因为程序运行时就出错,我试过的。 pcdreama朋友的这种方法中能够使用UBB代码吗?是不是必须使用HTML代码?现在的问题是客户他不会用HTML代码,如果用JS往上写HTML代码,好象不行,因为程序运行时就出错,我试过的。 你看看csdn的文档中心的发布文档的功能。你的一切烦恼都解决了。 你可以看一下http://www.54no1.net/editor/,一个在线WEB文档编辑器。如果需要的话,我可以提供给你。 micheas(冷雨) 太谢谢了,你能给我发email过来吗??/我的email是:[email protected] 拜托,也发给我一份,先谢谢了email: [email protected] 如果使用实时预览那种方法,要做到怎样的程度,关键在于js怎样写.比如,在文本框写入UBB代码,那么onchange所调用的函数就应该具有把UBB代码还原为html,要不然就直接用js做html向导在文本框输入html.(你老板不需要懂html,他会用那些button就行了)如果那段js做得好肯定可以达到不错的效果的.其实上面写的那段html完全是一个示意,实际用的时候当然要改很多东西. 我的一个又系统用到的一部分。你可以参考参考,只是没有图片显示。代码优点乱将就一下看吧。如果能连上的话,看看http://202.117.179.2/php/news/我做的,heihei,给点意见.<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta name="GENERATOR" content="Microsoft FrontPage 4.0"><meta name="ProgId" content="FrontPage.Editor.Document"><title></title><link rel="stylesheet" href="bbs.css"><script language=javascript><!--function insertcode2(ss) { if (ss=='') return; document.login.neirong.focus(); var rr = document.selection.createRange(); if (rr.text=='') return; if(ss=='url'){ var Furl; Furl=prompt("输入超连接地址(必须有http://):",""); // prompt()方法 if(Furl=='') return; rr.text = '+'+ rr.text + ''; } else rr.text = '[' + ss+ ']' + rr.text + '[/' + ss+ ']';}function insertcode1(ss) { if (ss=='') return;// var s1 = document.getElementById("neirong");// s1.focus(); document.login.neirong.focus(); var rr = document.selection.createRange(); rr.text += ss;}function checkStr(){ if(document.login.leibie.value == 0) { alert("请选择文章类别!") document.login.leibie.focus() return false } if(document.login.xwbt.value == "") { alert("请输入文章标题!") document.login.xwbt.focus() return false } if(document.login.neirong.value == "") { alert("请输入文章内容!") document.login.neirong.focus() return false } return true}--></script></head><table border="1" width="100%" bordercolorlight="#75A9FF" cellspacing="0" cellpadding="2" bordercolordark="#FFFFFF" class="p1" background="images/bg_menu.gif"><form action="tjxw.php" method="post" name="login" onsubmit="return checkStr();"> <tr> <td width="100%"> <table border="0" width="100%" class="p1"> <tr> <td width="69" align="right">新闻标题:</td> <td><input type="text" value='' name="xwbt" size="82" class="p1" style="border-style: groove; border-width: 1"></td> </tr> <tr> <td width="69" align="right">类 别:</td> <td> <select name=leibie class=p1><option selected value='1'>本站公告</option><option value='2'>业界新闻</option><option value='3'>专题文章</option><option value='4'>研究动态</option><option value='7'>相关软件</option><option value='8'>康立宁用</option><option value='15'>蔚继承用</option></select> 来 源: <input type="text" value='' name="laiyuan" size="54" class="p1" style="border-style: groove; border-width: 1"></td> </tr> <tr><td align="center">工 具 栏:</td> <td> <select name="pbzw" onChange="insertcode2(document.login.pbzw.value)"> <option selected>正 文</option> <option value="h1">标题一</option> <option value="h2">标题二</option> <option value="h3">标题三</option> <option value="h4">标题四</option> <option value="h5">标题五</option> <option value="h6">标题六</option> </select> <select name="pbys" onChange="insertcode2(document.login.pbys.value)"> <option value="black" style="background-color:black;color=white" selected>黑 色</option> <option value="red" style="background-color:red">红 色</option> <option value="gold" style="background-color:gold">金 色</option> <option value="blue" style="background-color:blue;color=white">蓝 色</option> <option value="brown" style="background-color:brown">棕 色</option> <option value="green" style="background-color:green">绿 色</option> <option value="yellow" style="background-color:yellow">黄 色</option> <option value="purple" style="background-color:purple;color=white">紫 色</option> </select> <img src="images/bold.gif" width="16" height="16" onclick="insertcode2('B')" title="加粗"> <img src="images/italic.gif" width="16" height="16" onclick="insertcode2('I')" title="斜体"> <img src="images/underline.gif" width="16" height="16" onclick="insertcode2('U')" title="下划线"> <img src="images/alignleft.gif" width="16" height="16" onclick="insertcode2('Left')" title="左对齐"> <img src="images/aligncenter.gif" width="16" height="16" onclick="insertcode2('Center')" title="居中对齐"> <img src="images/alignright.gif" width="16" height="16" onclick="insertcode2('Right')" title="右对齐"> <select name="pblj" onChange="insertcode2(document.login.pblj.value)"> <option selected>--------</option> <option value="http">超链接一</option> <option value="url">超链接二</option> <option value="email">电子邮件</option> <option value="code">程序代码</option> </select> </td> </tr> <tr> <td width="69" valign="top" align="right">内 容:<br></td> <td valign="top"><textarea rows="19" name="neirong" cols="82" style="border-style: groove; border-width: 1" class="p1"></textarea></td> </tr> <tr> <td width="69" align="right">相关新闻:</td> <td><input type="text" value='' name="xgxw" size="46" class="p1" style="border-style: groove; border-width: 1"> <input type="checkbox" name="tuijian" value="是">推 荐 <input type="hidden" value="图片" name="B1" style="border-style: ridge; border-width: 1" class="p1"> <input type="submit" value="提交" name="submit" style="border-style: ridge; border-width: 1" class="p1" > <input type="reset" value="取消" name="cancel" style="border-style: ridge; border-width: 1" class="p1"> </td> </tr> </table> </td> </tr></form></table></body></html> 實際上用預覽效果也不錯的,參考下面:<META content="text/html; charset=big5" http-equiv=Content-Type><BODY><div id=xxx></div><form name=form1> <textarea name=dd rows=10 cols=50 onkeydown="change(this)"></textarea> <BR> <select name=changeColor onchange="changeC(this)"> <option value="" selected>更改字體顏色</option> <option value="#ff0000" style="background-color:#ff0000">紅色</option> <option value="#0000ff" style="background-color:#0000ff">藍色</option> <option value="#00ff00" style="background-color:#00ff00">綠色</option> </select> <select name=changeSize onchange="changeS(this)"> <option value="" selected>更改字體大小</option> <option value=2>2號</option> <option value=4>4號</option> <option value=6>6號</option> </select></form></body><script language=javascript>function change(){ var aa=document.form1.dd.value; aa=aa.replace(/</g,"<"); aa=aa.replace(/>/g,">"); aa=aa.replace(/ /g," "); aa=aa.replace(/\n/g,"<BR>"); aa=aa.replace(/\[C=#(\w{6})\]/g,"<font color=#"+"$1"+">"); aa=aa.replace(/\[S=(\d+)\]/g,"<font size="+"$1"+">"); aa=aa.replace(/\[\/[CS]{1}\]/g,"</font>"); xxx.innerHTML=aa;}function changeC(ob)//color{ if(ob.value=="") return ; var range = document.selection.createRange(); if(!range.text) return; range.text="[C="+ob.value+"]"+range.text+"[/C]"; change(); ob.selectedIndex=0;}> function changeS(ob)//size{ if(ob.value) return ; var range = document.selection.createRange(); if(!range.text) return; range.text="[S="+ob.value+"]"+range.text+"[/S]"; change(); ob.selectedIndex=0;}</script micheas(冷雨)大大,我也正在做一个web oa,正急需一个类似http://www.54no1.net/editor/的东东,能不能也给我发一分?谢谢先!我的email: [email protected] http://www.54no1.net/editor/的源文件JS我下不了呀,能不能发我一份?先谢谢了,阿迷托佛......Email:[email protected] 搞定!用一个离线浏览器(区华军下一个,我用的是webdup),在起始地址中输入http://www.54no1.net/editor/editor.html,下载层数设为不限,就可以把它完全下载回来。和在网上看一模一样 我放到这里了,有兴趣的请到这里来下载吧。http://bbs.54no1.net/showthread.php?s=&threadid=936 micheas(冷雨) 你的东西真是不错哦 好象DREAMWAVER有个插件就是在线制作的DW 见过没有? UBB论坛好像就是这样的你下一个参考一下 为什么不用xici上发帖的那个东东呢?那个多方便! micheas(冷雨) 多谢!!!!! 我也来一份! [email protected] >>http://www.54no1.net/editor/,一个在线WEB文档编辑器我访问不了,请哪们兄弟email我一份。[email protected][email protected] 这个东西如果用 IFRAME 嵌网页里 如何把值传给 TEXT 啊?拜托 给我一分吧, [email protected] 记录用户的访问次数的访问统计 请问如何在执行一个php程序的同时,在后台执行另一个网站的php程序 php分页(limit) 关于list() FTP 的 LIST 命令获取文件信息,就是没有年份,怎么得到??? php mysql 怎么知道某个会员哪些贴子是他没看过的。如何实现 各位达人,问一个PHP环境的问题,IIS 插入mysql之前的转义,大家通常采用什么方法? require_once在php4和php5里不一样???? 问几个很菜的问题,麻烦大家帮忙解决! 请问这是为什么?帮忙看看好吗? 我装的是php4.21为什么内部函数不能用呢?
你要我mail给你吧.你email?
但……我还以为vbb是什么好程序呢,小弟我一直就认为它不怎么样,再加上小弟一直从事的是纯商业性,和政府性网站的制作,也从想用它,它里面的功能和我要求的太远了,
pcdreama(峰幻) 您请看,如果你要添加一个粗体的汉字,你的操作步骤怎么样:
1、点击那个“b” 按钮,
2、在弹出的javascript的对话框中输入你要写的汉字,
3、文本框中出现您好
而我的要求是,现在在文本框中已经有很多文字了,这时我选中其中的一些文字,然后点击“b”按钮,这时我选种的那段文字的开头和结尾处分别加上了<b>和</b>
我的这要求是和vbb论坛完全不一样的,请教下各位高人,谢谢!
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<textarea onChange="document.all.preview.innerHTML=this.value" cols="50" rows="10"></textarea>
<br>
预览HERE:<br>
<span id=preview></span>
</body>
</html>
如果需要的话,我可以提供给你。
太谢谢了,你能给我发email过来吗??/
我的email是:[email protected]
比如,在文本框写入UBB代码,那么onchange所调用的函数就应该具有把UBB代码还原为html,要不然就直接用js做html向导在文本框输入html.(你老板不需要懂html,他会用那些button就行了)
如果那段js做得好肯定可以达到不错的效果的.
其实上面写的那段html完全是一个示意,实际用的时候当然要改很多东西.
<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta name="GENERATOR" content="Microsoft FrontPage 4.0"><meta name="ProgId" content="FrontPage.Editor.Document"><title></title><link rel="stylesheet" href="bbs.css"><script language=javascript>
<!--
function insertcode2(ss) {
if (ss=='') return;
document.login.neirong.focus();
var rr = document.selection.createRange();
if (rr.text=='') return;
if(ss=='url'){
var Furl;
Furl=prompt("输入超连接地址(必须有http://):",""); // prompt()方法
if(Furl=='') return;
rr.text = '+'+ rr.text + '';
}
else
rr.text = '[' + ss+ ']' + rr.text + '[/' + ss+ ']';
}function insertcode1(ss) {
if (ss=='') return;
// var s1 = document.getElementById("neirong");
// s1.focus();
document.login.neirong.focus();
var rr = document.selection.createRange();
rr.text += ss;
}function checkStr(){ if(document.login.leibie.value == 0) { alert("请选择文章类别!") document.login.leibie.focus() return false } if(document.login.xwbt.value == "") { alert("请输入文章标题!") document.login.xwbt.focus() return false } if(document.login.neirong.value == "") { alert("请输入文章内容!") document.login.neirong.focus() return false } return true}
-->
</script></head><table border="1" width="100%" bordercolorlight="#75A9FF" cellspacing="0" cellpadding="2" bordercolordark="#FFFFFF" class="p1" background="images/bg_menu.gif"><form action="tjxw.php" method="post" name="login" onsubmit="return checkStr();">
<tr> <td width="100%"> <table border="0" width="100%" class="p1"> <tr> <td width="69" align="right">新闻标题:</td> <td><input type="text" value='' name="xwbt" size="82" class="p1" style="border-style: groove; border-width: 1"></td> </tr> <tr> <td width="69" align="right">类 别:</td> <td> <select name=leibie class=p1><option selected value='1'>本站公告</option><option value='2'>业界新闻</option><option value='3'>专题文章</option><option value='4'>研究动态</option><option value='7'>相关软件</option><option value='8'>康立宁用</option><option value='15'>蔚继承用</option></select>
来 源: <input type="text" value='' name="laiyuan" size="54" class="p1" style="border-style: groove; border-width: 1"></td> </tr>
<tr><td align="center">工 具 栏:</td>
<td>
<select name="pbzw" onChange="insertcode2(document.login.pbzw.value)">
<option selected>正 文</option>
<option value="h1">标题一</option>
<option value="h2">标题二</option>
<option value="h3">标题三</option>
<option value="h4">标题四</option>
<option value="h5">标题五</option>
<option value="h6">标题六</option>
</select>
<select name="pbys" onChange="insertcode2(document.login.pbys.value)">
<option value="black" style="background-color:black;color=white" selected>黑 色</option>
<option value="red" style="background-color:red">红 色</option>
<option value="gold" style="background-color:gold">金 色</option>
<option value="blue" style="background-color:blue;color=white">蓝 色</option>
<option value="brown" style="background-color:brown">棕 色</option>
<option value="green" style="background-color:green">绿 色</option>
<option value="yellow" style="background-color:yellow">黄 色</option>
<option value="purple" style="background-color:purple;color=white">紫 色</option>
</select>
<img src="images/bold.gif" width="16" height="16" onclick="insertcode2('B')" title="加粗">
<img src="images/italic.gif" width="16" height="16" onclick="insertcode2('I')" title="斜体">
<img src="images/underline.gif" width="16" height="16" onclick="insertcode2('U')" title="下划线">
<img src="images/alignleft.gif" width="16" height="16" onclick="insertcode2('Left')" title="左对齐">
<img src="images/aligncenter.gif" width="16" height="16" onclick="insertcode2('Center')" title="居中对齐">
<img src="images/alignright.gif" width="16" height="16" onclick="insertcode2('Right')" title="右对齐">
<select name="pblj" onChange="insertcode2(document.login.pblj.value)">
<option selected>--------</option>
<option value="http">超链接一</option>
<option value="url">超链接二</option>
<option value="email">电子邮件</option>
<option value="code">程序代码</option>
</select>
</td>
</tr> <tr> <td width="69" valign="top" align="right">内 容:<br></td> <td valign="top"><textarea rows="19" name="neirong" cols="82" style="border-style: groove; border-width: 1" class="p1"></textarea></td> </tr> <tr> <td width="69" align="right">相关新闻:</td> <td><input type="text" value='' name="xgxw" size="46" class="p1" style="border-style: groove; border-width: 1"> <input type="checkbox" name="tuijian" value="是">推 荐 <input type="hidden" value="图片" name="B1" style="border-style: ridge; border-width: 1" class="p1"> <input type="submit" value="提交" name="submit" style="border-style: ridge; border-width: 1" class="p1" > <input type="reset" value="取消" name="cancel" style="border-style: ridge; border-width: 1" class="p1"> </td> </tr> </table> </td> </tr></form></table></body></html>
<META content="text/html; charset=big5" http-equiv=Content-Type>
<BODY>
<div id=xxx></div>
<form name=form1>
<textarea name=dd rows=10 cols=50 onkeydown="change(this)"></textarea>
<BR>
<select name=changeColor onchange="changeC(this)">
<option value="" selected>更改字體顏色</option>
<option value="#ff0000" style="background-color:#ff0000">紅色</option>
<option value="#0000ff" style="background-color:#0000ff">藍色</option>
<option value="#00ff00" style="background-color:#00ff00">綠色</option>
</select>
<select name=changeSize onchange="changeS(this)">
<option value="" selected>更改字體大小</option>
<option value=2>2號</option>
<option value=4>4號</option>
<option value=6>6號</option>
</form>
</body>
<script language=javascript>
function change()
{
var aa=document.form1.dd.value;
aa=aa.replace(/</g,"<");
aa=aa.replace(/>/g,">");
aa=aa.replace(/ /g," ");
aa=aa.replace(/\n/g,"<BR>"); aa=aa.replace(/\[C=#(\w{6})\]/g,"<font color=#"+"$1"+">");
aa=aa.replace(/\[S=(\d+)\]/g,"<font size="+"$1"+">"); aa=aa.replace(/\[\/[CS]{1}\]/g,"</font>");
xxx.innerHTML=aa;
}function changeC(ob)//color
{
if(ob.value=="") return ;
var range = document.selection.createRange();
if(!range.text) return;
range.text="[C="+ob.value+"]"+range.text+"[/C]";
change();
ob.selectedIndex=0;
}
>
function changeS(ob)//size
{
if(ob.value) return ;
var range = document.selection.createRange();
if(!range.text) return;
range.text="[S="+ob.value+"]"+range.text+"[/S]";
change();
ob.selectedIndex=0;
}
</script
谢谢先!
我的email: [email protected]
Email:[email protected]
http://bbs.54no1.net/showthread.php?s=&threadid=936
你的东西真是不错哦 好象DREAMWAVER有个插件就是在线制作的DW 见过没有?
多谢!!!!!
我访问不了,请哪们兄弟email我一份。
[email protected]
[email protected]
拜托