javascript 跳转 三种
<html>
<head>
<mce:script language="javascript"><!--
function old_page()
{
window.location = "http://www.jb51.net"
}
function replace()
{
window.location.replace("http://www.jb51.net")
}
function new_page()
{
window.open("http://www.jb51.net")
}
// --></mce:script>
</head>
<body>
<input type="button" onclick="new_page()" value="new_page"/>
<input type="button" onclick="old_page()" value="old_page"/>
<input type="button" onclick="replace()" value="replace"/>
</body>
相关文档:
scrollHeight: 获取对象的滚动高度。
scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离
scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离
scrollWidth:获取对象的滚动宽度
offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度
offsetL ......
/*****************************************************************************
* md5.js
*
* A JavaScript implementation of the RSA Data Security, Inc. MD5
* Message-Digest Algorithm.
*
* Copyright (C) Paul Johnston 1999. Distributed under the LGPL.
************************************** ......
JavaScript提供了一个RegExp对象来完成有关正则表达式的操作和功能,每一条正则表达式模式对应一个RegExp实例。有两种方式可以创建RegExp对象的实例。
使用RegExp的显式构造函数,语法为:new RegExp("pattern"[,"flags"])。
使用RegExp的隐式构造函数,采用纯文本格式:/pattern/[flags]。
pattern部分为要使用的正则 ......
<script>
var times = 0;
var ms = new Date();
var prex =0;
var pretoright=false;
var level =0;
function trackEarthQuake(){
var curx = event.screenX;
var toright ;
if(curx>prex){
  ......
// 去掉字符串左边空格
function trimToLeft(str){
var i;
for(i=0;i<str.length; i++) {
if(str.charAt(i)!=" ") break;
......