AJAX VS PHP动态网页? [英] AJAX VS PHP for dynamic web pages?

查看:88
本文介绍了AJAX VS PHP动态网页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么要使用AJAX为动态网页的时候可以只用PHP做呢?

Why use AJAX for dynamic web pages when you can do it only with php?

推荐答案

主要原因打扰AJAX是用户体验(UX)。

The main reason to bother with AJAX is User Experience (UX).

现在AJAX并不一定会提高UX在每一个实例,所以在很多地方贴的纯PHP是完全没问题的。

Now AJAX won't necessarily improve UX in every single instance so in a lot of places sticking with pure PHP is perfectly okay.

不过想象,你有一个文本字段在网站上的链接进行投票的东西的情况。有点像的网站的。当您添加AJAX的用户不会失去他们时,他们决定投票的链接的文本框输入的文字!多么的有用!

But imagine the case where you have a text field on the site and a link to vote on something. Kinda like this site. When you add AJAX your users won't loose the text they entered in the textfield when they decide to vote on the link! How incredibly useful!

所以,如果你关心你的用户体验是一个好主意,使用AJAX 在这样的情况下。

So if you care about your user's experience it is a good idea to use AJAX in situations like that.

这篇关于AJAX VS PHP动态网页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆