js location使用范例
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script>
function test(){
var loca=window.location;
// alert(loca);
window.location="http://blog.csdn.net"
}
</script>
</head>
<body>
<input type="button" value="test" οnclick="test()" />
</body>
</html>