下面的脚本作品就像一个沙姆沙伊赫:文件撰写( '<SCR' +“IPT ...不工作
<script type="text/javascript">
document.write('<scr'+'ipt type="text/javascript">alert("werwer")</sc'+'ript>');
</script>
但是这一次不为什么
?<script type="text/javascript">
$.getScript('http://www.geoplugin.net/javascript.gp', function() {
$location = geoplugin_countryName();
if($location == "Canada" || $location == "United States") {
// >>>some code>>>
} else {
document.write('<scr'+'ipt type="text/javascript">alert("werwer")</sc'+'ript>');
}
});
</script>
使用的jsfiddle请帮我一个例子非常欢迎
感谢
请定义“不工作”。 – kapa 2012-07-12 14:19:33
http://jsfiddle.net/g3kMt/1/ - >它不显示消息 – user1520883 2012-07-12 14:21:11
.getScript()可能完全失败。检查控制台是否有错误。 – Trott 2012-07-12 14:21:12