<input type=button onclick="aa()" value="check"><script>
function aa()
{
a=new ActiveXObject("Microsoft.XMLHTTP")
a.open("GET","http://expert.csdn.net/",false)
a.send()
if(a.status==200) alert("ok")
else
window.oepn('c.htm')
}
</script>