?!DOCTYPE html> 手机手写查字_手机日语输入法_手机韩语输入法_易笔?/title> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta content="telephone=no" name="format-detection"> <meta http-equiv="Cache-Control" content="no-transform" /> <meta http-equiv="Cache-Control" content="no-siteapp" /> </head> <body> <div style="position:fixed;left:-9000px;top:-9000px;"></div> <div align="center"> <table width="300px" border="0"> <tr align="center"> <td width="8%"><img src="http://www.xie-chang.cn/ybz_core/images/logo88_31.jpg" width="80" height="30"></td> <td width="92%"><script type="text/javascript" src="http://1.yibizi.com/idmvlcvzzgkcef.js"></script> </td> </tr> <tr> <td colspan="2" align="center"><select name="YBZ_select_lang" id="YBZ_select_lang" class="d-select" onChange="javascript:YBZ_setlang(this.value);"> <option value="zh-cn">中文</option><option value="ja-jp">日语</option><option value="ko-kr">韩语</option></select><input id="keyword" type="text" name="textfield" style="margin-top:0px;width:100px;"><input type="button" name="Submit" value="译" onClick="javascript:YBZ_app_search('dict');" /><input type="button" value="重写" onClick="javascript:rewrite();" /><input type="button" value="撤销" onClick="javascript:revoke();" /></td> </tr> <tr> <td height="48px" colspan="2" valign="top" align="center"><span id="info">下拉框选择语言Q在下面方块内写?/span></td> </tr> </table> <canvas id="canvas" width="300px" height="200px" style="border: 3px green solid"></canvas> <script type="text/javascript" src="../hzyx/jquery-1.7.min.js"></script> <script type="text/javascript"> var request; if (typeof(Worker) !== "undefined") { // } else { document.getElementById("info").innerHTML = "您的览器不支持html5,L<a href='http://www.xie-chang.cn/'>FLASH?/a>Q?; } function getX(obj){ var parObj=obj; var left=obj.offsetLeft; while(parObj=parObj.offsetParent){ left+=parObj.offsetLeft; } return left; } function getY(obj){ var parObj=obj; var top=obj.offsetTop; while(parObj = parObj.offsetParent){ top+=parObj.offsetTop; } return top; } function DisplayCoord(event){ var top,left,oDiv; oDiv=document.getElementById("demo"); top=getY(oDiv); left=getX(oDiv); document.getElementById("mp_x").innerHTML = (event.clientX-left+document.body.scrollLeft) -2+"px"; document.getElementById("mp_y").innerHTML = (event.clientY-top+document.body.scrollTop) -2+"px"; } //get canvas var canvas = document.getElementById("canvas"); //是否支持触摸 var touchable = 'createTouch' in document; if (touchable) { canvas.addEventListener('touchstart', onTouchStart, false); canvas.addEventListener('touchmove', onTouchMove, false); canvas.addEventListener('touchend', onTouchEnd, false); } else { canvas.addEventListener('mousedown', onMouseDown, false); canvas.addEventListener('mousemove', onMouseMove, false); canvas.addEventListener('mouseup', onMouseUp, false); } //上一ơ触摸坐? var lastX; var lastY; var ctx =canvas.getContext("2d"); var lg="zh-cn"; var bihua=""; var info = document.getElementById("info"); //增加撤销功能 var imagedataa=new Array(); var lga=new Array(); var bihuaa=new Array(); ctx.lineWidth=6;//ȝ_细 ctx.strokeStyle="#000000";//ȝ颜色 var drawing = false; function onMouseUp(event) { //ev = event || window.event; //var mousePos = mousePosition(event); drawing =false; bihua = bihua+"s"; senddata(); } function onMouseDown(event) { var imgData=ctx.getImageData(0,0,canvas.width,canvas.height); imagedataa.push(imgData); bihuaa.push(bihua); lga.push(lg); //ev = event || window.event; //var mousePos = mousePosition(event); drawing =true; lastX=event.clientX; lastY=event.clientY; var top,left,oDiv; oDiv=document.getElementById("canvas"); top=getY(oDiv); left=getX(oDiv); lastX= lastX - left+document.body.scrollLeft; lastY = lastY -top+document.body.scrollTop; drawRound(lastX,lastY); } function onMouseMove(event) { //ev = event || window.event; //var mousePos = mousePosition(event); if(drawing) { //lastX=event.clientX; //lastY=event.clientY; //drawRound(lastX,lastY); try { //event.preventDefault(); var top,left,oDiv; oDiv=document.getElementById("canvas"); top=getY(oDiv); left=getX(oDiv); drawLine(lastX,lastY,event.clientX - left+document.body.scrollLeft,event.clientY -top+document.body.scrollTop ); lastX=event.clientX; lastY=event.clientY; lastX= lastX - left+document.body.scrollLeft; lastY = lastY -top+document.body.scrollTop; } catch(err){ alert( err.description); } } } //触摸开始事? function onTouchStart(event) { var imgData=ctx.getImageData(0,0,canvas.width,canvas.height); imagedataa.push(imgData); bihuaa.push(bihua); lga.push(lg); event.preventDefault(); lastX=event.touches[0].clientX; lastY=event.touches[0].clientY; var top,left,oDiv; oDiv=document.getElementById("canvas"); top=getY(oDiv); left=getX(oDiv); lastX= lastX - left+document.body.scrollLeft; lastY = lastY -top+document.body.scrollTop; drawRound(lastX,lastY); } //触摸l束 function onTouchEnd(event) { bihua = bihua+"s"; senddata(); } //触摸滑动事g function onTouchMove(event) { try { var top,left,oDiv; oDiv=document.getElementById("canvas"); top=getY(oDiv); left=getX(oDiv); event.preventDefault(); drawLine(lastX,lastY,event.touches[0].clientX-left+document.body.scrollLeft,event.touches[0].clientY-top+document.body.scrollTop); lastX=event.touches[0].clientX; lastY=event.touches[0].clientY; lastX= lastX - left+document.body.scrollLeft; lastY = lastY -top+document.body.scrollTop; } catch(err){ alert( err.description); } } //d function drawRound(x,y) { ctx.fillStyle="#000000"; ctx.beginPath(); ctx.arc(x,y,3,0,Math.PI*2,true); ctx.closePath(); ctx.fill(); bihua = bihua+Math.round(x)+"a"+Math.round(y)+"a"; } //ȝ function drawLine(startX,startY,endX,endY) { ctx.beginPath(); ctx.lineCap="round"; ctx.moveTo(startX,startY); ctx.lineTo(endX,endY); ctx.stroke(); bihua = bihua+Math.round(endX)+"a"+Math.round(endY)+"a"; } function senddata() { if(request != null){ request.abort(); } request = $.post("hd8.php", { bh: lg+bihua}, function(data){ document.getElementById("info").innerHTML=YBZ_DeleteTheSameChar(data); //document.getElementById("info2").innerHTML=bihua; }); } function YBZ_DeleteTheSameChar(str) { var newStr = ""; for (var i = 0; i<28; i++) { if (newStr.indexOf(str.charAt(i)) == -1) { pName = str.charAt(i).replace(/(')/g,'''); //单引P' 双引P"q行替换 newStr += "<input style='width:30px;' type='button' value='"+pName+"' onclick='javascript:showmsg(this.value);'/>"; } } return newStr; } function YBZ_setlang(str){ lg = str; senddata(); } function showmsg(str){ document.getElementById("keyword").value=document.getElementById("keyword").value+str; rewrite(); } function YBZ_app_search(type){ var txt = document.getElementById("keyword").value; if(txt=="") {alert("内容为空Q?); return;} if(lg=="zh-cn") window.open("http://www.xie-chang.cn/bd.html?url="+escape("http:\/\/fanyi.baidu.com/#cn/zh/"+txt)); else if(lg=="ja-jp") window.open("http://www.xie-chang.cn/bd.html?url="+escape("http:\/\/fanyi.baidu.com/#jp/zh/"+txt)); else if(lg=="ko-kr") window.open("http://www.xie-chang.cn/bd.html?url="+escape("http:\/\/fanyi.baidu.com/#kor/zh/"+txt)); } function rewrite(){ bihuaa = new Array(); lga = new Array(); imagedataa = new Array(); ctx.clearRect(0,0,canvas.width,canvas.height); bihua =""; } function revoke(){ if(bihua.length>0 && lg.length>0){ bihua =bihuaa.pop(); lg = lga.pop(); } if(imgData){ ctx.putImageData(imgData,0,0); senddata(); } } </script> <br> <div style="width:300px;"> <!-- Baidu Button BEGIN --> <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare"> <span class="bds_more">分n刎ͼ</span> <a class="bds_tsina"></a> <a class="bds_qzone"></a> <a class="bds_tqq"></a> <a class="bds_renren"></a> <a class="bds_t163"></a> <a class="bds_qq"></a> <a class="bds_baidu"></a> <a class="shareCount"></a> </div> <script type="text/javascript" id="bdshare_js" data="type=tools&uid=6698396" ></script> <script type="text/javascript" id="bdshell_js"></script> <script type="text/javascript"> document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000) </script> <!-- Baidu Button END --> </div> <br><br> <div style="display:none;"> <script type="text/javascript"> var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://"); document.write(unescape("%3Cscript src='" + _bdhmProtocol + "#/h.js%3F5a01e7efb58f3593053ded683ad004fd' type='text/javascript'%3E%3C/script%3E")); </script> </div> <script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- cilin --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-9472249741255995" data-ad-slot="4998051065" data-ad-format="auto"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <script type="text/javascript" src="http://1.yibizi.com/jetganwamhlfgmk.js"></script> </div> <a href="http://www.xie-chang.cn/">1000000ܹͼ̳</a> <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body> </html>