<script>
var url = document.location.href;
if(url.indexOf("www.csdn.net")>-1){
alert("正确");
}else{
alert("不是www.csdn.net");
}
</script>