mootools.net
域名年龄: 19年2个月15天HTTP/1.1 301 永久重定向 服务器:nginx 访问时间:2019年06月26日 14:16:43 类型:text/html 文件大小:178 连接:keep-alive 目标网址:https://mootools.net/ HTTP/1.1 200 OK 访问时间:2019年06月26日 14:16:43 类型:text/html; charset=utf-8 Transfer-Encoding: chunked 连接:keep-alive 语言环境:Express Content-Encoding: gzip 网站编码:utf-8
Your resources for every-day JavaScriptingCore MoreBlogForgeContributeMooTools is a collection of JavaScript utilities designed for the intermediate to advanced JavaScript developer. It allows you to write powerful and flexible code with its elegant, well documented, and coherent APIs.MooTools code is extensively documented and easy to read, enabling you to extend the functionality to match your requirements.Open Source LicenseMooTools libraries are released under the Open Source MIT license which gives you the possibility to use them and modify them in every circumstance.How to use?MooTools SelectorsSelectors for DOM Elements// get elements by class$$('.foo'); // or even: document.getElements('.foo');// selector with different elements$$('div.foo, div.bar, div.bar a');// get a single element document.getElement('div.foo'); Ajax!MooTools uses a Class called Request.// create a new Class instance var myRequest = new Request({ url: 'getMyText.php', method: 'get', onRequest: function(){ myElement.set('text', 'loading...'); }, onSuccess: function(responseText){ myElement.set('text', responseText); }, onFailure: function(){ myElement.set('text', 'Sorry, your request failed :('); } }); // and to send it: myRequest.send(data); To send a form it can be even more simple!myForm.send(); // optionally you can add/change the form properties myForm.set('send', {url: 'contact.php', method: 'get'}); How to create new DOM elementsA simple MooTools Element example.// the short way new Element('div#bar.foo'); // using the element constructor new Element('div', { 'class': 'foo', id: 'bar' }); Event handlersAttach events to be updated on what's happening!// attach a click event o a element myElement.addEvent('click', function(){ alert('clicked!'); }); // attach several events at a time myElement.addEvents({ mouseover: function(){ alert('mouseover'); }, click: function(){ alert('click'); } }); You can also remove, fire or clone events!// remove a event myElement.removeEvent(type, fn); MooTools ClassA simple MooTools Class example.var Animal = new Class({ initialize: function(age){ this.age = age; } }); var Cat = new Class({ Extends: Animal, initialize: function(name, age){ // calls initalize method of Animal class this.parent(age); this.name = name; } }); var myCat = new Cat('Micia', 20); alert(myCat.name); // alerts 'Micia'. alert(myCat.age); // alerts 20. Blog Entries1.6.0 is out!Today marks the release of MooTools Core and More versions 1.6.0. This is a minor revision that delivers a number of bug fixes as well as the introduction of new features. The main new adition is Class.Thenab... GitHub Activityprintersupport247: commented on mootools-core@3f0a91dholuamit86: opened issue mootools-core#2803ragua: closed issue mootools-more#1357ragua: opened issue mootools-more#13
© 2010 - 2020 网站综合信息查询 同IP网站查询 相关类似网站查询 网站备案查询网站地图 最新查询 最近更新 优秀网站 热门网站 全部网站 同IP查询 备案查询
2025-05-07 14:57, Process in 0.0048 second.