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¼´¿É¡£
Ïà¹ØÎĵµ£º
1¡¡¾Ö²¿´òÓ¡·½·¨£º
×÷Ó㺽«idΪdayinµÄÄÚÈÝ£¬Ð½¨Ò³Ãæ²¢´òÓ¡£¬¿É½â¾ö´òӡijҳÃæÖеIJ¿·ÖÄÚÈݵÄÎÊÌâ¡£
ʹÓ÷½·¨£º½«Òª´òÓ¡µÄÄÚÈÝͨ¹ý <span id="dayin"></span>°üº¬ÆðÀ´£¬È»ºóÔÚij¸ö°´Å¤Öж¨Òå
ʼþ
<input type="button" onclick="dayin()" value="´òÓ¡">
function dayin()
{
......
Build your web applications quickly and easily using the industry leading web application IDE -- Aptana Studio.
Introduction:
Aptana Studio is a complete web development environment that combines powerful authoring tools for HTML, CSS, and JavaScript, along with thousands of additional plugins ......
¼¸ºõËùÓеĸ» Web Ó¦Óö¼»ùÓÚÒ»¸ö»ò¶à¸ö Web UI ¿â»ò¿ò¼Ü£¬ÕâЩ UI
¿âÓë¿ò¼Ü¼«´óµØ¼ò»¯ÁË¿ª·¢½ø³Ì£¬²¢´øÀ´Ò»Ö£¬¿É¿¿£¬ÒÔ¼°¸ß¶È½»»¥ÐÔµÄÓû§½çÃæ¡£±¾ÎĽéÉÜÁË 15 ¸ö·Ç³£Ç¿´óµÄ JavaScript Web UI
¿â£¬·Ç³£Êʺϸ÷ÖÖ¸÷ÖÖ¹æÄ£µÄ¸» Web Ó¦ÓõĿª·¢¡£
LivePipe
LivePipe
UI
»ùÓÚ Prototype Javascript ¿ò¼Ü
£¬°üº ......
function $id(s) {
return document.getElementById(s);
}
//ÅжÏСÊý
function IsFloat(s) {
if (!/^[+\-]?\d+(.\d+)?$/.test(s))
return false;
else
return ......
// JScript Îļþ
/********************************************************/
/*Åж¨·µ»ØֵΪtrue»òfalse*/
/********************************************************/
//´ò¿ªÒ»¸öÐÂÁ´½Ó
function openwindow()
{
//var $j = jQuery.noConflict();
  ......