Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

jQuery ajax upload image

$(function(){
new AjaxUpload('file1', {
action: 'uploadpic.asp',
name: 'form1',
data:{act:'uploadfile',FormName:'form1'},
autoSubmit:false,
responseType:'json',
onSubmit:function(file,ext){
if (!(ext && /^(jpg|png|gif)$/i.test(ext))){
alert('ÇëÄúÉÏ´«jpg|png|gif¸ñʽµÄͼƬ!');
return false;
}
else{
$('#esave').show();
}
},
onComplete:function(file,response){
$('#esave').hide();
$('#pic').val(response.imgfile);
}
});
});


Ïà¹ØÎĵµ£º

Ajax add_beginRequest

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat=" ......

Ajax add_pageLoading

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs" Inherits="WebUserControl" %>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode=Conditional>
<ContentTemplate>
<%=DateTime.Now %>
</ContentTemplate>
</asp:UpdatePanel> ......

ÓÃC#ץȡAJAXÒ³ÃæµÄÄÚÈÝ

ÏÖÔÚµÄÍøÒ³ÓÐÏ൱һ²¿·ÖÊDzÉÓÃÁËAJAX¼¼Êõ,²»¹ÜÊDzÉÓÃC#ÖеÄWebClient»¹ÊÇHttpRequest¶¼µÃ²»µ½ÕýÈ·µÄ½á¹û,ÒòΪÕâЩ½Å±¾ÊÇÔÚ·þÎñÆ÷·¢ËÍÍê±Ïºó²ÅÖ´ÐеÄ!
µ«ÎÒÃÇÓÃIEä¯ÀÀÒ³ÃæʱÊÇÕý³£µÄ,ËùÒÔ½â¾ö·½·¨Ö»ÓÐ1¸ö¾ÍÊDzÉÓÃWebBrowser¿Ø¼þ
µ«ÊÇʹÓÃWebbrowserÄã»á·¢ÏÖ,ÔÚDownloadCompleteʼþÖÐ,Äã¸ù±¾ÎÞ·¨ÖªµÀÒ³ÃæºÎʱ²ÅËãÊÇÕæÕýµ ......

asp.net mvc ajax Íⲿjs Òì²½µÝ½» formµÄʵÏÖ

Ò³ÃæÎļþÀàËÆ£º
<% using (Ajax.BeginForm("AjaxUpdate", 123, new AjaxOptions {
Confirm = "confirm str", LoadingElementId = "idLoading", UpdateTargetId
= "textEntered", OnSuccess = "validateForm" },new{id="idMyForm"}))
  &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ