首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Ajax >

JQUERY > 异步(ajax)下传图片

2013-03-22 
JQUERY 异步(ajax)上传图片?html xmlnshttp://www.w3.org/1999/xhtmlhead idHead1 runatserv

JQUERY > 异步(ajax)上传图片

?

    <html xmlns="http://www.w3.org/1999/xhtml">      <head id="Head1" runat="server">          <title></title>  <meta charset="utf-8">        <script src="./jquery-1.4.min.js" type="text/javascript"></script>          <script src="./jquery.form.js" type="text/javascript"></script>          <script type="text/javascript">              function uploadImage() {  $('#imgDiv').html('开始上传');  $('#UpLoadForm').ajaxSubmit(null,"imgDiv");            }          </script>      </head>      <body>      <form  enctype="multipart/form-data" action="http://***.com/img_receive.php" method="post"  id="UpLoadForm">      <input type="file" id="uploadFile" runat="server" name="upfile" />      <input type="button" id="btnUpload" value="确定" onclick="uploadImage()" />      <div id="imgDiv">    </div>      </form>      </body>      </html>  

?

其中 jquery.form.js ?见附件

?

?

热点排行