\n';
}
function getElementsByClassName(oElm, strTagName, strClassName){
var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
var arrReturnElements = new Array();
strClassName = strClassName.replace(/\-/g, "\\-");
var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
var oElement;
for(var i=0; i');
$("#search").show();
$("#search").val(search_value);
setRandomSearchBoxName();
} else {
$(".for-popthai").show();
$("#logo-ads").addClass('popthai-mode');
$("#longdo-latest, #contents-showup").hide();
// $("#contents-showup").next().hide();
$("#contents-showup-popthai").show();
$('input.translate-type:checked').val('popthai');
$('#textboxPlaceholder').html('');
$("#search").text(search_value);
setRandomSearchBoxName();
if(obj === undefined) {
checkLan(search_value, $(".translate-language").val() == "Auto");
}
}
$("#search").focus();
return true;
}
function doSubmit(obj) {
var form_obj = obj ? obj.form : document.getElementById("dict");
$(form_obj).attr("method", 'post');
var search_value = $("#search").val();
$("#search").attr('name', "search");
$("#search").hide();
$(".for-popthai").hide();
$(".read-bt, .read-bt-accent").removeClass('translate');
var inpType = $('input.translate-type:checked').val();
if (inpType == 'translate') {
$("#longdo-latest, #contents-showup").show();
$("#contents-showup-popthai").hide();
$("#logo-ads").removeClass('popthai-mode');
$("#search").show();
$(".read-bt, .read-bt-accent").addClass('translate');
if(search_value != "" && !obj) {
window.location = "/search/" + escape(encodeURIComponent(search_value.replace(/\n\r?/g, ' ')));
return false;
} else {
$('#textboxPlaceholder').html(' ');
setRandomSearchBoxName();
}
} else {
$(".for-popthai").show();
$("#logo-ads").addClass('popthai-mode');
$("#longdo-latest, #contents-showup").hide();
$("#contents-showup-popthai").show();
var searchinput = $('#search');
value = search_value;
$('#textboxPlaceholder').html('');
setRandomSearchBoxName();
searchinput = document.getElementById('search');
searchinput.value = value;
searchinput.focus();
searchinput.select();
if(obj === undefined) {
checkLan(search_value, $(".translate-language").val() == "Auto");
}
}
$("#search").focus();
return true;
}
function checkLan(search_value, isChange) {
var langSelect = $(".translate-language");
if(isChange) {
if(/[-ヿ]/g.test(search_value)) {
langSelect.val('JP');
} else if(/[\u3400-\u9FBF]/g.test(search_value)) {
langSelect.val('ZH');
}
$(".is-auto-language").val('true');
} else {
$(".is-auto-language").val('false');
}
$(".search-bt").prop('disabled', true);
}
function isUrl(url) {
var pattern = /^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i
if(!pattern.test(url)) {
return false;
} else {
return true;
}
};
// -->
วางเมาส์ที่คำศัพท์เพื่อแสดงป๊อปอัป
แสดงคำอ่าน
线索 ( xiàn suǒ ) 是 ( shì ) 警察 ( jǐng chá ) 抓小偷 ( ) 用 ( yòng ) 的 ( de )
线索 (xiàn suǒ, ㄒㄧㄢˋ ㄙㄨㄛˇ ) trail; clues; thread (of a story) [CE-DICT]
是 (これ) (pn) (1) (uk) (See 何れ・1,其れ・1,彼・あれ・1) this (indicating an item near the speaker, the action of the speaker, or the current topic); (2) (hum) this person (usu. indicating someone in one's in-group); (3) now; (4) (arch) here; (5) (arch) I (me); (6) (arch) certainly; (P) [EDICT] (ぜ) (n) righteousness; justice; right [EDICT] (shì, ㄕˋ ) is; are; am; yes; to be [CE-DICT]
警察 (けいさつ) ตำรวจ [LongdoJP] (けいさつ) (n,adj-no) police; (P) [EDICT] (jǐng chá, ㄐㄧㄥˇ ㄔㄚˊ ) police; policeman; policewoman [CE-DICT]
用 (よう) (n,n-suf) (1) task; business; (2) use; duty; service; (3) (See 用を足す) call of nature; excretion; (P) [EDICT] (yòng, ㄩㄥˋ ) to use [CE-DICT]
的 (てき) (adj-na,suf) -like; typical; (P) [EDICT] (まと) (n) mark; target; (P) [EDICT] (de, ㄉㄜ˙ ) of; structural particle: used before a noun, linking it to preceding possessive or descriptive attributive [CE-DICT] (dí, ㄉㄧˊ ) really and truly [CE-DICT] (dì, ㄉㄧˋ ) aim; clear [CE-DICT]
เราทราบดีว่าท่านผู้ใช้คงไม่ได้อยากให้มีโฆษณาเท่าใดนัก แต่โฆษณาช่วยให้ทาง Longdo เรามีรายรับเพียงพอที่จะให้บริการพจนานุกรมได้แบบฟรีๆ ต่อไป
ดูรายละเอียดเพิ่มเติม