- 时间:2021-05-13 15:42 编辑: 来源: 阅读:
- 扫一扫,手机访问
摘要:改进:论坛UBB代码自动插入方式
目前IECN论坛的UBB自动插入时,总是将插入的内容加到了文章末尾,使用起来很不方便。刚刚对它进行了一下改进。
改进的代码参考river以前贴过的JS,在此对river深表感谢^^
改进后:
1.可在“[b]当前光标处[/b]”插入相应的UBB代码
2.可在“[b]当前选中的内容[/b]”首尾分别插入相应的UBB代码
3.通过浏览器:IE 5.0+, FireFox 1.06+, Opera8.5+
[b]相关JS代码:[/b]
[url=http://cnlei.iecn.net/mycode/ubb4iecn/ubb4iecn.js]http://cnlei.iecn.net/mycode/ubb4iecn/ubb4iecn.js[/url]
[b]相关HTML代码:[/b]
[url=http://cnlei.iecn.net/mycode/ubb4iecn/write_ubb.html]http://cnlei.iecn.net/mycode/ubb4iecn/write_ubb.html[/url]
[b]完整页面:[/b]
[url=http://cnlei.iecn.net/mycode/ubb4iecn/write.html]http://cnlei.iecn.net/mycode/ubb4iecn/write.html[/url]
[b]参考贴子:[/b]:
[url=http://www.iecn.net/bbs/view/101436.html]http://www.iecn.net/bbs/view/101436.html[/url]
代码请直接看上述演示链接的文件吧,在论坛里贴不了-_-