分享JavaScript在线压缩工具
This tool will let you optimize your JavaScript (JScript) code by removing comments, whitespace as well as other unnecessary characters as well as by optionally shortening function / variable / class names.
http://www.xtreeme.com/javascript-optimizer/
相关文档:
<html>
<head>
<script language="javascript">
function MyClick() ......
<SCRIPT LANGUAGE="JavaScript">
<!--
// Trim() , Ltrim() , RTrim()
String.prototype.Trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
String.prototype.LTrim = function()
{
return this.replace(/(^\s*)/g, "");
}
String.prototype.RTrim = functio ......
数组属于JavaScript中的复合数据类型。
JavaScript中一个数组可以存储JavaScript支持的任何数据类型,比如可以用一个数组来处理用户从中选择的项目列表,或者一组图像坐标,或者一组图片的引用。
创建Array对象并初始化 ......
opener.window表示打开它的原框架。
top表示顶部框架,
parent引用包含这个窗口的window对像
例子如下;
a.htm页面
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<hea ......