error: function(){
$('#html_source1').val('服务器繁忙,请稍后再试!');
}
});
}
}


//special_htmlchar
function get_special_htmlchar(div_id, key_word){

$('#'+div_id).ajaxStart(function(){$(this).html('<div class="loading">正在加载...</div>')});

$.ajax({
type: "post",
cache:false,
url: action['special_htmlchar'],
data: "action=special_htmlchar&key_word="+key_word,
timeout:timeout,
success: function(data){
$('#'+div_id).html(data);
},
error: function(){
$('#'+div_id).html('服务器繁忙,请稍后再试!');
}
});

}

//robot
function get_robot(){

var domain = $('#domain').val().is_domain();

if(!domain){

return false;

}

$("#robot").ajaxStart(function(){$(this).html('<div class="loading">正在加载...</div>')})

$.ajax({
type: "post",
cache:false,
url: action['root'],
data: "action=robot&domain="+domain,
timeout:timeout,
success: function(data){
$('#copybutton').show();
$('#robot').html(data);
},
error: function(){
$('#robot').html('服务器繁忙,请稍后再试!');
}
});

}

//density
function get_density(){

var domain = $('#domain').val().is_domain();

if(!domain){

return false;

}

$("#density").ajaxStart(function(){$(this).html('<div class="loading">正在加载...</div>')})

$.ajax({
type: "post",
cache:false,
url: action['density'],
data: "action=density&domain="+domain,
timeout:timeout,
success: function(data){
$('#density').html(data);
},
error: function(){
$('#density').html('服务器繁忙,请稍后再试!');
}
});


}

// keyword
function get_keyword(){

var domain = $('#domain').val().is_domain();

if(!domain){

return false;

}

var keyword = $('#keyword').val();

if(!keyword.trim()){

alert('请输入要查询的关键字!');

return false;

}

var page = $('#page').val();

var engine = $('#engine').val();

$("#engine_keyword").ajaxStart(function(){$(this).html('<div class="loading">正在加载...</div>')})

$.ajax({
type: "post",
cache:false,
url: action['engine_keyword'],
data: "action=keyword&domain="+domain+'&engine='+engine+'&keyword='+keyword+'&page='+page,
timeout:100000,
success: function(data){
$('#engine_keyword').html(data);
},
error: function(){
$('#engine_keyword').html('服务器繁忙,请稍后再试!');
}
});

}

//rate
function get_rate(){

$("#rate").ajaxStart(function(){$(this).html('<div class="loading">正在加载...</div>')})

var a = document.getElementById('a').value;

var b = document.getElementById('b').value;

var number = document.getElementById('number').value;

//是否为数字
var regular=/^\d+\.?\d*$/;

if(!regular.test(number)){

alert('请您输入有效的数字!');

return false;

}

$.ajax({
type: "post",
cache:false,
url: action['rate'],
data: "action=rate&a="+a+'&b='+b+'&number='+number,
timeout:100000,
success: function(data){
$('#rate').html(data);
},
error: function(){
$('#rate').html('服务器繁忙,请稍后再试!');
}
});

}

function set_rate_img(val,object){

document.getElementById('rate_img').src = val;

var a = document.getElementsByTagName('a');

for(var i=0; i < a.length; i++){
if(a[i].className = 'active'){
a[i].className = '';
}
}

object.className = 'active';

}

//导航
function change_navigation(object,number){

$("#toolmenu li").removeClass();

object.parentNode.className = 'focu';

for(var i=0;i<10;i++){
if(document.getElementById('pack'+i) != null){
document.getElementById('pack'+i).style.display ='none';
}
}

document.getElementById('pack'+number).style.display ='block';

}

function copy(txt)
{
if (window.clipboardData)
{
window.clipboardData.setData("Text",txt);
}
else
{
txt = encodeURIComponent(txt);

var flashcopier = 'flashcopier';
if(!document.getElementById(flashcopier))
{
var divholder = document.createElement('div');
divholder.id = flashcopier;
document.body.appendChild(divholder);
}
document.getElementById(flashcopier).innerHTML = '';
var divinfo = '<embed src="js/clipboard.swf" flashvars="clipboard='+txt+'" type="application/x-shockwave-flash" width="0" height="0"></embed>';
document.getElementById(flashcopier).innerHTML = divinfo;
}

alert("复制成功");
}


/*加入本机书签*/
function add_bookmark() {
var title = document.title;
var url = window.location;
if (window.sidebar) {
window.sidebar.addPanel(title, url,"");
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}

function isIE() {
if(document.all) return true;
return false;
}

/*设置为首页*/
function set_homepage(url){
if (document.all)
{
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage(url);
}else{
if (window.sidebar)
{
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
}
catch (e)
{
alert("此操作被浏览器拒绝!\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'");
return false;
}
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
prefs.setCharPref('browser.startup.homepage',url);

}
}
}

function selectTag(showContent,selfObj){
var tag = document.getElementById("searchmenu").getElementsByTagName("li");
var taglength = tag.length;
for(i=0; i<taglength; i++){
tag[i].className = "";
}
selfObj.parentNode.className = "focu";
for(i=0; j=document.getElementById("baidu"+i); i++){
j.style.display = "none";
}
document.getElementById(showContent).style.display = "block";
}
function clicklogo(){
//if( !isIE() || checkhomepage()){
window.location=('http://tool.114la.com/index.html');
//}else{
// document.getElementById('logourl').style.behavior='url(#default#homepage)';
// document.getElementById('logourl').setHomePage('http://tool.114la.com/index.html');
//}
}
function checkhomepage(){
if (document.getElementById('logo').isHomePage("http://tool.114la.com/index.html") ||

Prev | Next
Pg.: 1 2 3 4


Back to home | File page

Subscribe | Register | Login | N