这个脚本失败了,无法调试问题(对不起有一些TCL) [英] This script fails, can't debug the problem (has some TCL in it sorry)
问题描述
[脚本]
< script type = \" text / javascript \">
<! -
var browserArray = new Array(\" Microsoft Internet Explorer \",
\" Netscape \");
if(browserArray.in_array(navigator.appName,browserArray)&&
navigator.appName == \" Microsoft Internet Explorer \"&&
parseInt(navigator.appVersion)> = 4
){// IE用户
var url = \" ; http:// $ serverName \" ;;
var title = \" [regsub {"} $ brand {\& quot;} newBrand;设置
newBrand] \" ;;
document.write(''< A
Href = \" ; javascript :window.external.AddFavorite(url,title); \" return
true;'');
文件。 writeln(''\"> $ {smFont} BOOKMARK''+
title.toUpperCase()。replace(new RegExp(/(ä)|?/),
String.fromCharCase(228))+''< / font>< / a>'');
}否则if(browserArray.in_array(navigator。 appName,browserArray))
{// NETSCAPE,ETC使用CTRL-D
document.writeln(''$ {smFont} PRESS(CTRL-D )to BOOKMARK''+
title.toUpperCase()。replace(new RegExp(/(ä)|?/),
String.fromCharCase(228))+ ''< / font>'');
}
document.writeln(''|'');
>
// - >
< / script>
[/ SCRIPT]
运行时,此脚本无法识别正确的浏览器;我会在IE中获得
,它会认为它不是IE浏览器。
当还运行时,此脚本无法替换 ;?"还有
String.fromCharCase(228)。
请帮助,它影响现场网站
Thanx
Phil
serverName \" ;;
var title = \" [regsub {"}
brand {\& quot;} newBrand;设置
newBrand] \" ;;
document.write(''< A
Href = \" ; javascript :window.external.AddFavorite(url,title); \" return
true;'');
文件。 writeln(''\'">
{smFont} BOOKMARK''+
title.toUpperCase()。replace(new RegExp(/(ä) )|?/),
String.fromCharCase(228))+''< / font>< / a>'');
} else if(browserArray.in_array(navigator.appName,browserArray))
{// NETSCAPE,ETC使用CTRL-D
document.writeln('
[SCRIPT]
<script type=\"text/javascript\">
<!--
var browserArray = new Array(\"Microsoft Internet Explorer\",
\"Netscape\");
if (browserArray.in_array(navigator.appName, browserArray) &&
navigator.appName == \"Microsoft Internet Explorer\" &&
parseInt(navigator.appVersion) >= 4
) { // IE USERS
var url = \"http://$serverName\";
var title = \"[regsub {"} $brand {\"} newBrand; set
newBrand]\";
document.write('' <A
Href=\"javascript:window.external.AddFavorite(url, title);\" return
true;'');
document.writeln(''\">${smFont}BOOKMARK '' +
title.toUpperCase().replace(new RegExp(/(ä)|?/),
String.fromCharCase(228)) + ''</font></a>'');
} else if (browserArray.in_array(navigator.appName, browserArray))
{ // NETSCAPE, ETC USE CTRL-D
document.writeln(''${smFont}PRESS (CTRL-D) TO BOOKMARK '' +
title.toUpperCase().replace(new RegExp(/(ä)|?/),
String.fromCharCase(228)) + ''</font>'');
}
document.writeln('' |'');
//-->
</script>
[/SCRIPT]
When run, this script fails to recognize the correct browser; I''ll be
in IE and it''ll think it''s not IE.
When also run, this script fails to replace "?" with
String.fromCharCase(228) as well.
Please help, it''s affecting a live site
Thanx
Phil
serverName\";
var title = \"[regsub {"}
brand {\"} newBrand; set
newBrand]\";
document.write('' <A
Href=\"javascript:window.external.AddFavorite(url, title);\" return
true;'');
document.writeln(''\">
{smFont}BOOKMARK '' +
title.toUpperCase().replace(new RegExp(/(ä)|?/),
String.fromCharCase(228)) + ''</font></a>'');
} else if (browserArray.in_array(navigator.appName, browserArray))
{ // NETSCAPE, ETC USE CTRL-D
document.writeln(''
这篇关于这个脚本失败了,无法调试问题(对不起有一些TCL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!