论坛首页 Web前端技术论坛

离职交接没事做, 弄个JE评论彩色字...

浏览 126062 次
精华帖 (4) :: 良好帖 (12) :: 新手帖 (0) :: 隐藏帖 (2)
作者 正文
   发表时间:2012-05-04   最后修改:2012-05-04
试试楼主的功能
0 请登录后投票
   发表时间:2012-05-08  
javascript:var colorIndex=0;var colorSel=document.getElementById('select_color');var input=document.getElementById('editor_body');var inputVal=input.value;function makeColor(str){if(colorIndex>=colorSel.length-1){colorIndex=0};return "";};input.value='';for(i=0;i<inputVal.length;i++){input.value=input.value+makeColor(inputVal.charAt(i))};alert('done.'); 
0 请登录后投票
   发表时间:2012-05-08  
firefox
0 请登录后投票
   发表时间:2012-05-08  
我也测试看看,祝楼主新工作顺利。
0 请登录后投票
   发表时间:2012-05-10  
测试下,看看会有什么效果
0 请登录后投票
   发表时间:2012-05-10  
有点意思,小测一下
0 请登录后投票
   发表时间:2012-05-10  
0 请登录后投票
   发表时间:2012-05-10  
js
0 请登录后投票
   发表时间:2012-05-10  
落地窗 写道
js



代码如下:
javascript:var colorIndex=0;var colorSel=['red','yellow','orange','black'];var input=document.getElementById('post[body]');var inputVal=input.value;function makeColor(str){if(colorIndex>=colorSel.length-1){colorIndex=0};return "[color="+colorSel[colorIndex++]+"]"+str+"[/color]";};input.value='';for(i=0;i<inputVal.length;i++){input.value=input.value+makeColor(inputVal.charAt(i))};alert('done.');  

0 请登录后投票
   发表时间:2012-05-10  
上次没成功,这次再试试
0 请登录后投票
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics