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

javascript开发系列(面向对像)

javascript中的面像对像。
请看代码,下面弹出一个对话筐。
  <script type="text/javascript">
        function win(w, h,,url)
         {
            this.width = 100;
            this.height = 300;
            this.time = 10;
            this.url = url;
            this.openWin = function()
                 {
                  var iTop = (window.screen.availHeight) / 2;
                  var iLeft = (window.screen.availWidth - 10 - w) / 2;
                  window.showModalDialog('open.htm', '', 'dialogHeight=' + this.height + ',dialogWidth=' + this.width + ',help=0;status=1;scroll=1');
              }
         }
         function getWin() {
             var objwin = new win(100, 100,  'open.html');
             objwin.openWin();
          
         }
         window.onload = function() { getWin(); }
       
    </scr


相关文档:

Javascript 中对HTML编码和解码的方法

String.prototype.HTMLEncode = function() {
var temp = document.createElement ("div");
(temp.textContent != null) ? (temp.textContent = this) : (temp.innerText = this);
var output = temp.innerHTML;
temp = null;
return output;
}
String.prototype.HTMLDecode = function() {
var temp = doc ......

javascript对象机制

                var currItem = listbox.options[currIndex];
                var prevItem = listbox.options[currIndex - 1];
    &n ......

JavaScript 对象字面量

http://bei123wang.blog.163.com/blog/static/23175492009113022048840/
JavaScript 对象字面量
javascript 2009-12-30 14:20:48 阅读7 评论0 字号:大中小
JavaScript 对象字面量
在编程语言中,字面量是一种表示值的记法。例如,"Hello, World!" 在许多语言中都表示一个字符串字面量(string literal ),JavaScript ......

Javascript遍历Html Table(包括内容和 属性值)


1: 遍历并输出Table中值
<table id="tb">
    <tr>
       <td></td>
    </tr>
    <tr>
       <td></td>
    </tr>
</ ......

JavaScript去除空格的三种方法 (trim)

<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 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号