AjaxFilter
- 授权协议: 未知
- 开发语言:
- 操作系统: 未知
- 软件首页: http://plugins.jquery.com/project/AjaxFilter
软件介绍
This tiny plugin provides a registry for different filter functions to sanitize ajax responses.
It requires jQuery 1.3 with its new feature, the 'dataFilter' ajax setting.
If you want to provide a new implementation, you need to do something like this:
jQuery.ajaxFilter.register( 'js_in_href', 'html', function( data ){
return data.replace(/href="javascript:[^"]+"/g, '');
});or
jQuery.ajaxFilter.register('eval', 'script html json', function( data ){
return data.replace(/eval\(.+?\);?/g, '');
});Arguments for jQuery.ajaxFilter.register() are:
- Name for the filter, used as 'filter' when calling jQuery.ajax.
- One or more dataTypes to handle. Can be any combination of ajax, html, json and xml separated by spaces.
- The filter function. Will receive 2 arguments: the data and the type. The 'this' will reference the settings object.
To use it, you do:
jQuery.ajax({
url:'foo.html',
filter:'js_in_href',
// ...
});The filter can also parse the response.
That means it can (for example) provide an alternative way of eval'ing json. This is specially useful for Adobe AIR apps.
If the filter returns something else than a string, it's assumed to be the final response.
Effective C# 中文版
Bill Wagner / 李建忠 / 人民邮电出版社 / 2007-5 / 49.00元
本书围绕一些关于C#和.NET的重要主题,包括C#语言元素、.NET资源管理、使用C#表达设计、创建二进制组件和使用框架等,讲述了最常见的50个问题的解决方案,为程序员提供了改善C#和.NET程序的方法。本书通过将每个条款构建在之前的条款之上,并合理地利用之前的条款,来让读者最大限度地学习书中的内容,为其在不同情况下使用最佳构造提供指导。 本书适合各层次的C#程序员阅读,同时可以推荐给高校教......一起来看看 《Effective C# 中文版》 这本书的介绍吧!
