易截截图软件、单文件、免安装、纯绿色、仅160KB

javascript开发系列(多框架)

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">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function a(url,w,h) {
            var x = window.screen.availWidth/2-w;
            var y = window.screen.availHeight/2-h;
            var str = "height="+h+",width="+h+",top="+y+",left="+x+",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no";
            window.open(url, "_blank", str);
         }
     
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="atxtName" runat="server"  onclick="a('aa.aspx','100','500')"></asp:TextBox>
    </div>
    </form>
</body>
</html>
aa.html页面
<!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">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function aa() {
            opener.window.document.getElementById('atxtName


相关文档:

JavaScript in 10 Steps or Less

没有按别人的推荐,学什么圣经类的js书,而是随便挑了本《JavaScript in 10 Steps or Less》。
花了3个小时,看了30个task。
讲的非常浅显详细。虽然是E文,但很浅显易懂。
task31:
Calling Functions from Tags
One of the benefits of JavaScript is to be able to tie interactivity to elements of the HTML page. ......

javascript开发系列(面向对像)

javascript中的面像对像。
请看代码,下面弹出一个对话筐。
  <script type="text/javascript">
        function win(w, h,,url)
         {
            this.widt ......

JavaScript中数组(1)

       
       数组属于JavaScript中的复合数据类型。
 JavaScript中一个数组可以存储JavaScript支持的任何数据类型,比如可以用一个数组来处理用户从中选择的项目列表,或者一组图像坐标,或者一组图片的引用。
 
创建Array对象并初始化 ......

javascript 浮点数运算的时候出错 有比较明显的误差

/********************************************************************************/
//javascript在两个浮点数运算的时候会有比较明显的误差。增加下列方法解决。
//2009-07-18 Skyeah
//除法函数,用来得到精确的除法结果
//说明:javascript的除法结果会有误差,在两个浮点数相除的时候会比较明显。这个函数返回 ......

javascript开发系列(框架、窗口)

window,是javascript中整个框架中的根。它具有如下属性和方法:
属性:location,navigate,screen,frameset[],document,history等6个重要的属性.
方法:setTineOut(),moveTo(),moveBy(),resizeBy(),resizeTo()等几个常用的方法。
请看如下两个例子:
1、状态栏动态显示年月日
  function setTime() {
 &n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号