javascriptдÀ෽ʽ֮°Ë
8¡¢Ext.jsµÄдÀ෽ʽ
ÕâÀïÓõÄÊÇExt core3.0£¬ExtÖÐÓÃExt.extendÀ´¶¨ÒåÒ»¸öÀࣨµ±È»Ëü¸ü¶àÓÃÀ´À©Õ¹Ò»¸öÀࣩ£¬ExtÕû¸ö¿ò¼Ü¸÷ÖֿؼþÈçPanel£¬MessageBoxµÈ¶¼ÊÇÓÃExt.extend·½·¨À´À©Õ¹¡£ÕâÀï½ö½öÓÃËüÀ´¶¨ÒåÒ»¸ö×î¼òµ¥µÄÀà¡£
¿´Ext.extendµÄ´úÂë¿ÉµÃÖª£¬ËüÈÔÈ»ÊÇÓù¹Ô캯ÊýºÍÔÐÍÀ´×é×°Ò»¸öÀà¡£
ÕâÀïÖ»Ðè´«Á½¸ö²ÎÊý¼´¿É£¬µÚÒ»¸ö²ÎÊýÊǸùÀàObject£¬µÚ¶þ¸öÊÇÔÐÍ¡£
/**
* PersonÀà
* @param {Object} name
*/
var Person = Ext.extend(Object,{
constructor : function(name) {this.name = name;},
setName : function(name) {this.name = name;},
getName : function() {return this.name;}
});
//´´½¨Ò»¸ö¶ÔÏó
var p = new Person("Lily");
console.log(p.getName());//Lily
p.setName("Andy");
console.log(p.getName());//Andy
//²âÊÔinstanceof¼°p.constructorÊÇ·ñÕýÈ·Ö¸ÏòÁËPerson
console.log(p instanceof Person);//true
console.log(p.constructor == Person);//true
±È½ÏÌØÊâµÄÊÇ£¬Èç¹ûµ¥´¿µÄ¶¨ÒåÒ»¸öÀ࣬ÄÇôµÚÒ»¸ö²ÎÊýÓÀÔ¶´«Object¼´¿É¡£
Ïà¹ØÎĵµ£º
// JScript Îļþ
/********************************************************/
/*Åж¨·µ»ØֵΪtrue»òfalse*/
/********************************************************/
//´ò¿ªÒ»¸öÐÂÁ´½Ó
function openwindow()
{
//var $j = jQuery.noConflict();
  ......
¼¸ºõËùÓеĸ» Web Ó¦Óö¼»ùÓÚÒ»¸ö»ò¶à¸ö Web UI ¿â»ò¿ò¼Ü£¬ÕâЩ UI ¿âÓë¿ò¼Ü¼«´óµØ¼ò»¯ÁË¿ª·¢½ø³Ì£¬²¢´øÀ´Ò»Ö£¬¿É¿¿£¬ÒÔ¼°¸ß¶È½»»¥ÐÔµÄÓû§½çÃæ¡£±¾ÎĽéÉÜÁË 15 ¸ö·Ç³£Ç¿´óµÄ JavaScript Web UI ¿â£¬·Ç³£Êʺϸ÷ÖÖ¸÷ÖÖ¹æÄ£µÄ¸» Web Ó¦ÓõĿª·¢¡£
LivePipe
LivePipe UI »ùÓÚ Prototype Javascript ¿ò¼Ü£¬°üº¬Á ......
1.document.write("");
Ϊ
Êä³öÓï¾ä
2.JS
ÖеÄ×¢ÊÍΪ
//
3.
´«Í³µÄ
HTML
ÎĵµË³ÐòÊÇ
:document->html->(head,body)
4.
Ò»¸öä¯ÀÀÆ÷´°¿ÚÖеÄ
DOM
˳ÐòÊÇ
:window->(navigator,screen,history,location,document)
5.
µÃµ½±íµ¥ÖÐÔªËصÄÃû³ÆºÍÖµ
:document.getElementById("
±í ......
<html>19Â¥¿Õ¼ä,`(uqj3~9?!F
<body>
Ob*p#?L;DL0<scrīpt LANGUAGE="Javascrīpt">
+t:{z]tbs0var s = "";19Â¥¿Õ¼äe kA3HoT1H
s += "ÍøÒ³¿É¼ûÇøÓò¿í£º" + document.body.clientWidth;19Â¥¿Õ¼äcy2if}:H/SE@
s += "<br>ÍøÒ³¿É¼ûÇøÓò¸ß£º"+ document.bo ......