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

推荐订阅源

WordPress大学
WordPress大学
A
About on SuperTechFans
量子位
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
Microsoft Azure Blog
Microsoft Azure Blog
V
V2EX
Google DeepMind News
Google DeepMind News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog
U
Unit 42
D
DataBreaches.Net
博客园 - Franky
D
Docker
宝玉的分享
宝玉的分享
Y
Y Combinator Blog
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Hugging Face - Blog
Hugging Face - Blog

博客园 - 迷梦江南

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 !”