《javascript入门经典》摘录

JavaScript中可以对内建对象进行扩展。


<!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--> < html >
< head >< title > Testofheadingmethod </ title >
</ head >
< body >
< script LANGUAGE ="JavaScript" type ="text/javascript" >
function addhead(level){
html
= " H " + level;
text
= this .toString();
start
= " < " + html + " > " ;
stop
= " </ " + html + " > " ;
return start + text + stop;
}
String.prototype.heading
= addhead;
document.write(
" Thisisaheading1 " .heading( 1 ));
document.write(
" Thisisaheading2 " .heading( 2 ));
document.write(
" Thisisaheading3 " .heading( 3 ));
</ script >
</ body >
</ html >

1Prototype<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Prototype is free, open-source software. You can download it from its official website at http://prototype.conio.net/. Prototype is also built into the Ruby on Rails framework for the server-side language Rubysee http://www.rubyonrails.com/ for more information.

2Script.aculo.us

Script.aculo.us by Thomas Fuchs is one such library. It includes functions to simplify drag-and-drop tasks, such as rearranging lists of items. It also includes a number of Combination Effects, which enable you to use highlighting and animated transitions within your pages.

3AJAX Frameworks

The Prototype library, described previously, includes <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><city w:st="on"><place w:st="on">AJAX</place></city> features. There are also many dedicated <city w:st="on"><place w:st="on">AJAX</place></city> libraries. One of the most popular is SAJAX (Simple AJAX), an open-source toolkit that makes it easy to use <city w:st="on"><place w:st="on">AJAX</place></city> to communicate with PHP, Perl, and other languages from JavaScript. Visit the SAJAX website for details at http://www.modernmethod.com/sajax.

4Dojo (http://www.dojotoolkit.org/) is an open-source toolkit that adds power to JavaScript to simplify building applications and user interfaces. It adds features ranging from extra string and math functions to animation and <city w:st="on"><place w:st="on">AJAX</place></city>.

5, The Yahoo! UI Library (http://developer.yahoo.net/yui/) was developed by Yahoo! and made available to everyone under an open-source license. It includes features for animation, DOM features, event management, and easy-to-use user interface elements such as calendars and sliders.

6, MochiKit (http://mochikit.com/) is a lightweight library that adds features for working with the DOM, CSS colors, string formatting, and <city w:st="on"><place w:st="on">AJAX</place></city>. It also supports a nice logging mechanism for debugging your scripts.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值