首页 > 编程语言 > 详细

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

时间:2015-01-06 10:07:35      阅读:279      评论:0      收藏:0      [点我收藏+]

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应用框架

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!