<script>
var url = document.location.href;
if(url.indexOf("www.csdn.net")>-1){
alert("正确");
}else{
alert("不是www.csdn.net");
}
</script>
var url = document.location.href;
if(url.indexOf("www.csdn.net")>-1){
alert("正确");
}else{
alert("不是www.csdn.net");
}
</script>
if(url.indexOf("www.csdn.net")>-1){
document.write("<scr"+"ipt src="http://map.google.com/maps?file=api&v=2&key=1 </script>");
}else{
document.write("<scr"+"ipt src="http://map.google.com/maps?file=api&v=2&key=2 </script>");
}抄楼上的