1(function($){ 2 3 /** 4 * Covert char fullsize to haftsize 5 * @return Char 6 */ 7 function convertToHalfWidth(fullWidthNum) { 8 return fullWidthNum.replace(/[\uFF10-\uFF19]/g, function(m) { 9 return String.fromCharCode(m.charCodeAt(0) - 0xfee0); 10 }); 11 } 12 13 $(function() { 14 $("#id_search_btn").click(function(e) { 15 searchPageId(e); 16 }); 17 // ã¨ã³ã¿ã¼ãã¼ã¯ãªãã¯æã«æ¤ç´¢ãã 18 $("#id_search_txt").keypress(function(e) { 19 if (e.keyCode == 13) { 20 searchPageId(e); 21 } 22 }); 23 24 function searchPageId(e) { 25 var pageId = convertToHalfWidth($("#id_search_txt").val()); 26 if (pageId.length === 0) { 27 alert("ãã¼ã¸IDãæå®ããã¦ãã¾ããã"); 28 } else if (isNaN(pageId)) { 29 alert("ãã¼ã¸IDã䏿£ã§ãã"); 30 } else { 31 $.ajax({ 32 url : '/cgi-bin/search_page/search_page.php', 33 type : "POST", 34 cache : false, 35 async : true, 36 dataType: 'json', 37 data : { page_id : pageId }, 38 scriptCharset : 'UTF-8', 39 success : function(ret) { 40 if (ret.result_code == 1) { 41 window.location.href = ret.path; 42 } else { 43 alert("対象ã®ãã¼ã¸ãè¦ã¤ããã¾ããã§ããã"); 44 } 45 }, 46 error : function(XMLHttpRequest, textStatus, errorThrow) { 47 alert("ãã¼ã¸æ å ±ã®åå¾ã«å¤±æãã¾ããã"); 48 return false; 49 } 50 }); 51 } 52 e.preventDefault(); 53 } 54 }); 55 56})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.