위: 아래 코드에 주의하세요. utf-8 형식으로 저장하는 것이 가장 좋습니다. 그렇지 않으면 쉽게 깨져서 표시되지 않습니다. 코드 복사 코드는 다음과 같습니다. head> javascript Kingsoft PowerWord 온라인 번역 🎜 > <br>function $(id) { return document.getElementById(id) } function callScript(url, selected, error, charset) { <br>var script = document.createElement("script"); <br>if (typeof charset == "string") script.charset = <br>script; . onreadystatechange = function() { <br>switch (this.readyState) { <br>case "complete": <br>case "loaded": <br>if (typeofloaded == "function")loaded(); <br>if (script.parentNode) script.parentNode.removeChild(script); <br>break; <br>} <br>} <br>script.onload = function() { <br>if (typeofloaded = = "함수") 로드됨(); <br>if (script.parentNode) script.parentNode.removeChild(script); <br>} <br>script.onerror = function() { <br>if (오류 유형 = = "함수") error(); <br>if (script.parentNode) script.parentNode.removeChild(script); <br>} <br>script.type = "text/javascript"; = "true"; <br>script.src = url; <br>var parent = document.getElementsByTagName("HEAD")[0] || document.documentElement <br>if (parent && parent.insertBefore) insertBefore (script, parent.firstChild) <br>} <br>function 버튼_translateClick() { <br>var word = encodeURIComponent($("text_word").value) <br>if (!word) { <br> 경고(''); <br>$("text_word").focus(); <br>return <br>} <br>callScript("http://server.dict-co.iciba.com/ jsInterface .php?uiType=0&w=" 단어 "&type=6"); <br>callScript("http://server.dict-co.iciba.com/jsInterface.php?uiType=0&w=" 단어 "&dict= Dict ,Tf,Enen,"); <br>callScript("http://server.dict-co.iciba.com/jsInterface.php?uiType=0&w=" word "&dict=Dict,Tf,Enen,") ; <br>callScript("http://server.dict-co.iciba.com/jsInterface.php?uiType=0&w=" word "&type=2") <br>} <br>function text_wordKeydown(e) { <br>if (!e) e = window.event; <br>switch (e.keyCode | e.which | e.charCode) { <br>case 13: <br>button_translateClick() <br>break ; <br>} <br>} <br>function LoveCallback(context) { <br>$("div_context").innerHTML = context <br>} <br>function dictCallBack(context) { <br>$( " div_head").innerHTML = context; <br>} <br>function tfCallback(context) { <br>$("div_thesaurus").innerHTML = context <br>} <br>function En2enCallback(context) { <br>$("div_en2en").innerHTML = context; <br>} <br>function djCallback(context) { <br>$("div_dj").innerHTML = context; <br>} <br>function searchDictByWord( e ) { <br>var element = typeof event != "undefine" ? event.srcElement : <br>$("text_word").value = element.innerHTML <br> > } <br> ; /div> " >