[wordpress插件] AHAXAHAX

wordpress 插件 文章 2020-02-12 10:40 545 0 全屏看文

AI助手支持GPT4.0

评分

0

0

描述

AHAX is a drop-in solution that allows theme or plug-in developers to take advantage of a very simple and streamlined way of making AJAX requests.

AHAX是一种嵌入式解决方案,允许主题或插件开发人员利用非常简单且精简的方式进行AJAX请求。

The goal of this plugin is to make the process of setting up an AJAX request as simple as possible.

此插件的目标是使设置AJAX请求的过程尽可能简单。

This plugin centers AJAX requests around an “action.” This action is “bound” to a function (handler) on the back-end and called to from front-end via a custom JavaScript class method — this process is demonstrated below

此插件将AJAX请求集中在一个“动作”周围。此动作“绑定”到后端的函数(处理程序),并通过自定义JavaScript类方法从前端调用到该动作-如下所示

.

Back-End

后端

ahax::bind( 'get_random_number', 'generate_number' );

  ahax :: bind('get_random_number','generate_number');

function generate_number($output) { $max = abs( ( int ) $_POST['max'] );

函数generate_number($ output){$ max = abs((int)$ _POST ['max']);

$output = mt_rand( 0 , ( $max <= 1000 ? $max : 1000 ) );

$ output = mt_rand(0,($ max <= 1000?$ max:1000));

return $output;

返回$ output;

}

}

Front-End

前端

var ahax = new AHAX();

  var ahax = new AHAX(); 

ahax.post( 'get_random_number', { max : 1000 }, function( response ) { jQuery( '#ahax_number' ).html( response ); });

ahax.post('get_random_number',{max:1000},function(response){jQuery('#ahax_number').html(response);});

Website

网站

http://dan.doezema.com/2011/04/ahax-wordpress-plugin

http://dan.doezema.com/2011/04/ahax-wordpress-plugin

Author

作者

Daniel Doezema

丹尼尔·多兹玛

安装步骤

    1. Upload ahax plugin directory to the /wp-content/plugins/ directory.
    2. ahax 插件目录上传到 / wp-content / plugins / 目录。

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

下载地址

https://downloads.wordpress.org/plugin/ahax.1.0.zip

https://downloads.wordpress.org/plugin/ahax.1.0.zip

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Reusable Blocks &#8211; Elementor, Beaver Builder, WYSIWYG可重复使用的块– Elementor,Beaver Builder,WYSIWYG
[wordpress插件] Do You Know Widget你知道小工具吗
[wordpress插件] Automatic Expiration for Categories自动过期的类别
[wordpress插件] Cleveritics for WordPressWordPress的技巧
[wordpress插件] Contact Form 7 &#8211; PayPal Extension联系表格7 – PayPal扩展
随便看看
微信公众号免300认证教程 4991
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 4112
小程序广告组件通过审核,但是小程序内没有显示广告? 4289
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8073
问题? 7298
如何快速搭建抽奖助手小程序(无需代码知识) 5081
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 6036
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5648
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5239
如何解决渲染层网络错误Failed to load media? 16591