Home > Web Front-end > JS Tutorial > jquery��getʵ��ajax��ie����ˢ�²������̨�������_jquery_�ű�֮��

jquery��getʵ��ajax��ie����ˢ�²������̨�������_jquery_�ű�֮��

WBOY
Release: 2016-05-16 17:25:57
Original
1436 people have browsed it
���ƴ��� ��������:

function verify() {
var jqueryObj = $("#username");
var username = jqueryObj.val();

//var url = "servlet/UserInfo?username=" encodeURI(encodeURI(username));
var url = "servlet/UserInfo?username=" username;

//ע����������ie���û��漼��������ͬһurl��ֻ�е�һ�λص��ú�̨���Ժ���ʵľ����������

//�������ʱ������Ϳ�����ƭһ��ie��ÿ�ζ����Է��ʺ�̨�ˣ�^_^

url = convertURL(url);
$.get(url, null, callback);
}

function callback(data) {
alert(data);
$("#userInfo").html(data);
}
function convertURL(url) {
var timestamp = new Date().valueOf();

if (url.indexOf("?") > 1) {
url = url "&t=" timestamp;
} else {
url = url "?t=" timestamp;
}
return url;
}
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template