在一个页面里面放了两个富文本编辑器(simditor),但是提交form的时候只能取到第一个的值,取不到第二个的值,邮件问官方,官方说他们自己测试没问题,可以取到两个。又试了其它编辑器,包括bootstrap-wysiwyg,redactor等,都只能取到第一个,不能取到第二个,但是放两个纯textarea,就没问题,不知道是哪里的原因问题页面http://quyi.sinaapp.com/translate.php用的get,可以看到url里面没有第二个textarea的值相关代码:原文题目:译文题目:(function(){$(function(){vareditor;editor=newSimditor({textarea:$('#txt-content1'),placeholder:'这里输入文字...',pasteImage:true,toolbar:['title','bold','italic','underline','strikethrough','|','ol','ul','blockquote','code','table','|','link','image','hr','|','indent','outdent'],defaultImage:'assets/images/image.png',upload:location.search==='?upload'?{url:'/upload'}:false});returneditor=newSimditor({textarea:$('#txt-content2'),placeholder:'这里输入文字...',pasteImage:true,toolbar:['title','bold','italic','underline','strikethrough','|','ol','ul','blockquote','code','table','|','link','image','hr','|','indent','outdent'],defaultImage:'assets/images/image.png',upload:location.search==='?upload'?{url:'/upload'}:false});});}).call(this);趣译网,最好的翻译和双语阅读平台。即刻提高你的英语©Funtranslate2014vardi;vardiv_id='translate_word';di=document.getElementById(div_id);//makediif(!di){di=document.createElement("DIV");}di.id=div_id;di.style.position='absolute';di.style.backgroundColor='white';document.body.appendChild(di);varget_selected_word=function(){vartxt='';//notsupportie6(whichcannotusethisscript:P)txt=document.getSelection();returntxt.toString();}varifr=document.createElement('iframe');ifr.id='yd_translat_ifr';vararea=document//.getElementById("test")area.onmouseup=function(e){//alert("asdf");vartxt=get_selected_word();sh=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;varleft=(e.clientX-40
添加回答
举报
0/150
提交
取消