码迷,mamicode.com
首页 > 编程语言 > 详细

MooTools---开源JavaScript web应用框架

时间:2015-01-06 10:08:47      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:mootools

MooTools 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.


官网:http://mootools.net/



<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script
	src="http://libs.baidu.com/mootools/1.4.5/mootools-yui-compressed.js"></script>
<title>test</title>
</head>
<body>
	<button onclick="test()">test</button>
	<br>
	<div id="myElement"></div>

	<script type="text/javascript">
		function test() {
			var myElement = document.id('myElement');

			var myRequest = new Request({
				url : 'http://localhost',
				method : 'get',
				onRequest : function() {
					myElement.set('text', 'loading...');
				},
				onSuccess : function(responseText) {
					myElement.set('text', responseText);
				},
				onFailure : function() {
					myElement.set('text', 'Sorry, your request failed :(');
				}
			});

			myRequest.send();

		}
	</script>

</body>
</html>


MooTools---开源JavaScript web应用框架

标签:mootools

原文地址:http://blog.csdn.net/graceup/article/details/42428297

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!