<html>
<head>
<title>How to use mootools</title>
<script type="text/javascript" src="lib/mootools.js"></script>
</head>
<body>
<div id="content">test the event</div>
<button id="btn">click me </button>
<script type="text/javascript" src="js/mt.js"></script>
<script type="text/javascript">
var obj = "this is my message";
window.addEvent('domready',function(){
new Request.HTML({url:'index.html',method:'get',update:'content'});
$('content').set('text',"change the inner html");
$('btn').addEvent('click',function(){
console.log(obj)
});
});
</script>
</body>
</html>
[Mootools] Simple tutorial of how to use domReady, DOM operation and Ajax in Mootools
最新推荐文章于 2020-07-30 18:21:43 发布