惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
I
InfoQ
Engineering at Meta
Engineering at Meta
D
DataBreaches.Net
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
GbyAI
GbyAI
爱范儿
爱范儿
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
美团技术团队
罗磊的独立博客
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网
M
MIT News - Artificial intelligence
D
Docker
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs
博客园 - 叶小钗

博客园 - 迷梦江南

DB2问题记录本 AS3无缝循环播放FLV flex开发零碎笔记,随时补充 AS3淡入淡出类 JQuey练习一 转“大型网站架构演变和知识体系” 转“大型高并发高负载网站的系统架构 ” 转“经验分享:大型高并发高负载网站的系统架构 ” 转“关于平台研发的一些想法” 转“国内图片网站Yupoo的架构” C#测试代码段运行速度 - 迷梦江南 - 博客园 javascript放大图片 - 迷梦江南 - 博客园 javascript网站导航栏 - 迷梦江南 - 博客园 QQ在线状态接口 - 迷梦江南 - 博客园 (转)Javascript在IE与Firefox下的差异 WebApplication与Profile购物车 网站发布后出现的两个问题 mootools实现搜索提示文本框修正版 ASP.NET查看本地磁盘下的子目录和文件信息
mootools 1-4 ajax
迷梦江南 · 2011-11-07 · via 博客园 - 迷梦江南

很久没有用过mootools,以前用的是1.1,现在升级到1.4了。下载新版下来发现AJAX的实现方法都变了,做个demo留个记号。

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>AJAXTest1--requestText</title>

    <script src="http://www.cnblogs.com/mootools/mootools-core-1[1].4.1-full-nocompat.js" type="text/javascript"></script>
    
    <script type="text/javascript">
    window.addEvent('domready',function(){
        $('btnSent').addEvent('click',function(){
            var url='ajaxtest.aspx?v='+escape($('txtValue').value);
            var myRequest = new Request({method: 'post', url: url,onComplete:showMsg});
            myRequest.send('v='+escape($('txtValue').value));  
        });
       function showMsg(requestText){
           $('divRebackMsg').innerHTML=requestText;
       }
    });
    </script>
</head>
<body>
    <input id="txtValue" type="text" />
    <input id="btnSent" type="button" value="发送" />
    <div id="divRebackMsg"></div>
</body>
</html>

在后台page_load里输出“Hello,Mootools !”