Total Pageviews

Showing posts with label ajax. Show all posts
Showing posts with label ajax. Show all posts

Thursday, 9 June 2022

JS + JQuery + AJAX的前端设计

JS基础

JS教程 -> https://www.liaoxuefeng.com/wiki/1022910821149312

MDN的JS文档 -> https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide

MDN还有关于HTML以及CSS的文档


JQuery文档

上面的JS教程中有部分关于 JQuery 的介绍,具体可参考 JQuery文档 -> https://api.jquery.com/


AJAX简介

上面的JS教程中有部分关于AJAX的介绍,具体可参考JQuery中关于AJAX的文档 -> https://api.jquery.com/category/ajax/

上述"工具"的简单总结

对于前端来说,你必须首先学习 html css以及js ,这是你开发一个网页必须的东西。我们可以不掌握网页设计中的每一个细节,但是一定要做到能够读懂一个网页的实现,清楚它的设计过程,这样我们就可以通过模仿来进行学习,这种方法对初学者来说很适合,特别是时间紧任务重的初学者。

实现一个网页需要 html 搭建整个页面的框架,用 css 来设计样式,然后使用js来进行动态处理,这就是一个网页的典型实现过程(我说的!)。但是为了能够以一种更加简单和高效的方法来搭建一个网页, 我们可能需要一些高效的工具和技术,比如我们可能会用到的 JQuery 和 AJAX 。 jquery 是 js 的一个库,它可以使得前端开发中的很多对网页的操作简单高效并且解决因为不同浏览器对 JS/CSS/DOM 支持不一致产生的令人头疼的兼容问题,比如,选择特定元素,事件等等。AJAX指的是一套综合了多项技术的浏览器端网页开发技术,使用 Ajax 的最大优点,就是能在不更新整个页面的前提下维护数据。这使得Web应用程序更为迅捷地回应用户动作,并避免了在网络上发送那些没有改变的信息。通过它我们很自然的处理网页与服务之间的数据交互。关于具体的介绍和使用方法可以查看相关的资料,我就不胡扯了。

---------

Maven简介


SpringMVC简介及其配置



mybatis简介及其配置

Mabatis的简介及其相关配置 -> https://mybatis.org/mybatis-3/zh/sqlmap-xml.html

Monday, 23 August 2021

Web前端实战案例


案例1: Web前端开发工程师-网易微专业毕业设计

####涉及技术点:

  1. HTML + CSS 基本布局;
  2. 登录弹窗组件 + cookie 设置。
  3. 链接hover、鼠标悬停浮层等交互效果设计;
  4. 轮播头图实现;
  5. 内容区Tab切换;
  6. video视频弹窗实现;
  7. AJax + JSON 实现网站前后端交互设计,自动生成内容;
  8. @media实现网页动态布局效果(宽屏+窄屏)。

案例2:通过Ajax实现动态无刷新页面进行查询/添加操作。

涉及技术点:

  1. HTML+CSS简单布局
  2. Ajax + JSON 实现页面查询/添加操作。
  3. jQuery基础运用
  4. Ajax跨域解决方案(JSONP + CORS)

案例3:瀑布流布局实现。

涉及技术点:

  1. HTML+CSS简单布局
  2. jQuery基础运用 3.瀑布流布局实现3种方法:原生JS、jQuery、CSS3

案例4:企业网站综合布局实战-imooc

涉及技术点:

  1. HTML + CSS 基本知识
  2. 清除浮动float
  3. 盒子模型
  4. 两列自适应布局、三列布局
  5. JavaScript+jQuery运用。
  6. 焦点图特效

案例5:电商网站布局

涉及知识点

  1. HTML + CSS 基本知识
  2. 焦点图制作
  3. 导航栏、菜单栏等布局
  4. 整站开发及编写代码规范
  5. 浏览器兼容(IE6/IE7/IE8)常规处理

from  https://github.com/xifengxx/demo

Friday, 6 October 2017

使用ajax中文乱码问题解决办法

PHP中使用ajax中文乱码问题解决办法
当网页是utf-8编码的时候,使用ajax一般不会出现中文乱码的情况。但当网页编码为gb2313的时候,则会出现中文乱码的现象。这是由于XMLHttpRequest传送数据是UTF-8编码的,所以,可能会导致中文乱码问题。我的解决方法是,全部采用UTF-8编码。
静态部分用<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 申明一下是utf-8编码的。另外注意不要使用windows自带的记事本编辑,不能保存为utf-8格式。
动态部分用
header('Content-type:text/html;charset=utf-8');
另外使用responseXML方法的话,动态部分要用
header('Content-type:text/xml;charset=utf-8');
另外有时可能需要使用函数iconv('GB2312', 'utf-8',$str)来强制将gb2312编码转换成utf-8.
PHP发送中文、Ajax接收,只需在php顶部加入一句:
header('Content-type: text/html;charset=GB2312'); xmlHttp会正确解析其中的中文。
Ajax发送中文、PHP接收,这个则比较复杂:
Ajax中先用encodeURIComponent对要提交的中文进行编码
PHP中则要使用iconv函数:
$GB2312string=iconv( 'UTF-8','gb2312//IGNORE' , $RequestAjaxString);//注意红色部分!!!
PHP写入MySQL数据库,在建立conn时,query一下set names "gb2312"

Sunday, 15 June 2014

用ajaxinjector把静态网站变成动态网站

By Ajax Injector, you can convert your site from WEB1 (static links and forms) to a WEB2 (dynamic links and forms) site. All you have to do is including this script in your page and add a simple lines in bottom of your page, then you can see the MAGIC.

FROM
http://sourceforge.net/projects/ajaxinjector/files/latest/download
http://sourceforge.net/projects/ajaxinjector/

Monday, 7 January 2013

30 Fresh AJAX Tutorials And Techniques

Using AJAX on websites and applications is pretty much taken for granted nowadays. Users expect it. They want to be able to edit a page in-place, they want search queries to be auto-suggested, and they want to be able to submit a form without refreshing the page. Why? Because those things make browsing quicker, easier and, more importantly, enjoyable.
As great as AJAX is, though, it is not for every website or application. Part of the developer’s job is to know exactly where AJAX (or any technology for that matter) is needed. Too little can lead to user frustration. Too much causes misunderstanding. A balance and some restraints are always needed.
In this round-up, we have collected 30 fresh AJAX tutorials and techniques, covering almost every aspect of AJAX development: forms, applications, polls, editing, parsing, visual effects and much more.

AJAX Tutorials And Techniques

An AJAX-Based Shopping Cart with PHP, CSS and jQuery
In this tutorial, you will create an AJAX-driven shopping cart and store all of the products in a MySQL database, using PHP to process the data. jQuery will deliver the AJAX on the page, and with help of the simpletip plug-in, you will be able to deliver a high-end interactive check-out process.
View the demo.
Fresh AJAX Resources
Creating an AJAX Web App Using the Bit.ly API
Using Twitter’s URL shortener, bit.ly, and the jQuery library, you will be taken through the process of building an AJAX Web app. This is a great beginner tutorial, giving a detailed introduction to APIs and the basics of PHP and jQuery.
View the demo.
Fresh AJAX Resources
A Twitter List AJAX-Powered Fan Page
Twitter recently launched its new “lists” feature, which allows you to compile a list of your followers and organize them into categories. Using the newly expanded API (with list-management functionality added), you will learn how to create a widget that flips lists the other way round: this fan widget that goes in the sidebar allows visitors to fill in their Twitter name and join a special fan list from your Twitter account.
View the demo.
Fresh AJAX Resources
Learn How to AJAXify Comment Forms
Learn how to take a simple boring contact form and add some simple animation with an AJAX post request to submit the form to your MySQL database asynchronously.
Fresh AJAX Resources
A Simple AJAX Website with jQuery
Using jQuery, PHP and CSS, you will go through the process of creating a basic AJAX website. The finished product will load pages through AJAX from the PHP back-end and even completely support the browser history (something that is normally difficult to achieve with any AJAX or Flash website).
View the demo.
Fresh AJAX Resources
Create a Twitter-Like “Load More” Widget
In this tut, you will learn the technique—used by both Twitter and the Apple App Store—for loading more information. Simply by clicking the link or button, more content will appear, as if by magic. You will use AJAX, CSS, Javascript, JSON, PHP and HTML to build this widget. This tutorial features both the jQuery and the MooTools versions of the script.
View the demo.
Fresh AJAX Resources
A Simple Twitter App with Ruby on Rails
In this three-part tutorial series, you will set up a simple messaging model that holds posted messages. You will also learn how to post a message asynchronously.
View the demo.
Fresh AJAX Resources
AJAX Multiple-File-Upload Form Using jQuery
With this article, you will learn to develop an AJAXified multiple-file-upload form that uses much less server-side code and has a nice user interface. Thanks to the power of jQuery, the time spent on actual development is substantially reduced.
View the demo.
Fresh AJAX Resources
How to Send Facebook-Style Mail with PHP, AJAX and jQuery
The Facebook website is choc full of unique features, especially the system for sending mail and messages. Using PHP, AJAX and jQuery, you can recreate this technique using this step-by-step tutorial.
View the demo.
Fresh AJAX Resources
How to Create Your Own Stats Program (JavaScript, AJAX, PHP)
Chances are, you use an analytics programs such as Google Analytics, Get Clicky or Urchin to track every move and twitch on your website. They all track page views, visits, unique visitors, browsers, IP addresses and much more. But how exactly is this accomplished? Follow this tutorial and learn how to create your own basic Web statistics program using PHP, JavaScript, AJAX and SQLite.
View the demo.
Fresh AJAX Resources
AJAX Post Pagination in MooTools
Patiently browsing through the archive of posts on your WordPress website can be frustrating. A fix for this problem would be to use MooTools and AJAX to do the loading.
Fresh AJAX Resources
jQuery AJAX delete
Being able to remove content with Ajax is useful for any Web designer. Using a few lines of jQuery, you can remove both a DIV and a record from the database with AJAX. In this demo, you’ll see a small red cross to the right of each comment. Clicking the cross will remove the comment’s DIV, and the slide-up animation allows you to remove the DIV.
View the demo.
Fresh AJAX Resources
Voting System with jQuery, AJAX and PHP
Dzone offers users the chance to vote up or down on any particular link, giving an indication of how well an article has been received. In this tutorial, you learn how to recreate this unique voting system using jQuery, AJAX and PHP.
View the demo.
Fresh AJAX Resources
Creating a Dynamic Poll with jQuery and PHP
When you combine the neat functionality of PHP and the cleverness of jQuery, you can produce some pretty cool results. In this tutorial, you will create a poll using PHP and XHTML, then use some jQuery AJAX effects to eliminate the need for page refreshing and to give it a nice touch of animation.
View the demo.
Fresh AJAX Resources
AJAXify WordPress Comment Posting
Many WordPress plug-ins will AJAXify comments, but how do they do it? In this step-by-step tutorial, you will learn how to enable AJAXed comments with client-side JavaScript comment-form validation for any WordPress blog.
View the demo.
Fresh AJAX Resources
Create a Dynamic Scrolling Content Box Using AJAX
If you use Google Reader, then you may have noticed how it shows feed items. After you click on a feed, it loads a few items first, and as you scroll down to view more items, it adds more items dynamically to the list. This tutorial shows you how to create a similar content box that loads content dynamically as the user scrolls to the bottom of the box.
View the demo.
Fresh AJAX Resources
Create an In-Place Editing System
Making users click through multiple pages just to edit a single field is annoying. This tutorial shows you how to create an in-place editing system, as found on popular websites such as Flickr and then take things further with AJAX.
View the demo.
Fresh AJAX Resources
Submit A Form Without Page Refresh using jQuery
This article outlines a great way to use jQuery and AJAX to enhance the user experience, not just by validating the form but by submitting the contact form without having to refresh the page.
View the demo.
Fresh AJAX Resources
How To Parse XML Using jQuery and Ajax
In this tutorial you will learn how to parse or process an XML document and display the data on a page in HTML. This process can be used to filter raw RSS feeds, set up a cool site map on your blog or even lay the groundwork for your own auto-complete search.
View the demo.
Fresh AJAX Resources
Caching AJAX Results in Javascript
AJAX requests are usually faster than regular page loads and allow for a wealth of dynamism within the page. Unfortunately, many people do not properly cache request information when they can. The author shows you his improved method for caching AJAX requests.
Fresh AJAX Resources
How to Create an AJAX File Uploader
The application you will build in this tut uses jQuery’s versatility to allow multiple file uploads without a page refresh or redirection, complete with front- and back-end validation to prevent unwanted files from being uploaded to your server.
View the demo.
Fresh AJAX Resources
How to Create a Simple Web-Based Chat Application
The multiple-user Web-based chat application that you will build in this tutorial includes a log-in and log-out system, with AJAX-style features. The finished product would be perfect for a live support system for your website, as seen on the Vodafone and T-Mobile websites.
Fresh AJAX Resources
Facebook-like Auto-Suggestion with jQuery, AJAX and PHP
This article shows you how to recreate the unique auto-suggestion search feature of Facebook using jQuery, PHP and, of course, AJAX.
View the demo.
Fresh AJAX Resources
20 More Excellent AJAX Effects You Should Know
This article rounds up 20 relatively easy AJAX effects and techniques that can be used to spice up any page.
Fresh AJAX Resources
Record Text Selections Using MooTools or jQuery AJAX
This post demonstrates a useful technique for keeping track of what text users are highlighting and copying on a given Web page. It is helpful because it gives you an indication of what visitors really want from your website.
Fresh AJAX Resources
Automatically Update a Web Page with Dynamic Elements
You may know how to hide and display optional JavaServer Faces (JSF) components using JavaScript and CSS. To do this, you would first identify all JSF components and write them into JSF pages. But that is impossible when you are developing a Web page that contains dynamic elements that are unknown until runtime. With this article, learn how you can clear old UI components while automatically updating the dynamic elements of a Web page, as well as use Java code to add new elements and put them in their proper spot on a Web page. You’ll also learn how to bind different event handlers to different dynamic elements of a Web page, how to register a listener listening to changes of server-side data to invoke a page refresh, and how to use AJAX techniques to refresh only the dynamic parts of the Web page.
Fresh AJAX Resources
Build a Web Presentation Application using AJAX
How does Google Docs have such amazing functionality? It leverages Web 2.0 technologies, which provide robust functionality with relatively simple code. In this article, learn how to build a Web application to create slideshow presentations using AJAX.
Fresh AJAX Resources
Calendar Eightysix
Calendar Eightysix is an unobtrusive, developer-friendly JavaScript calendar and date-picker that offers a better user experience for date-related functionality. It is highly customizable and offers unique and quick navigation by jumping back and forth between months, years and decades without drop-down boxes.
View the demo.
Fresh AJAX Resources
jCart: AJAX/PHP Shopping Cart
jCart is a customizable jQuery plug-in that offers a simple e-commerce solution by handling visitor input without reloading the page.
Fresh AJAX Resources
AJAX Fancy Captcha
The Fancy Captcha jQuery plug-in is an intuitive and fresh way to complete those “verify humanity” tasks, offering reasonable protection against unwanted guests, namely bots and spammers. It works by asking you to verify yourself simply by dragging and dropping an item into a circle.

from http://www.noupe.com/ajax/30-fresh-ajax-tutorials-and-techniques.html