{"id":177069,"date":"2013-04-18T07:12:03","date_gmt":"2013-04-18T03:12:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=177069"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=177069","title":{"rendered":"<span class=\"post_title\">\u041a\u0430\u043a \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u0440\u0438 ajax \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445? \u0418 \u0430\u0441\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0418\u0442\u0430\u043a ajax \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e, \u0432\u0441\u0435 \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438 \u0438\u0445 \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u0442\u044c, \u043d\u043e \u0432\u0441\u0451 \u0436\u0435 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<br \/>  <a href=\"http:\/\/jquery-async.com\/js\/jquery.async.js\">jquery.async.js<\/a><\/p>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"html\">&lt;form action=&quot;\/&quot; jasync&gt; \t&lt;input type=&quot;submit&quot; \/&gt; &lt;\/form&gt; <\/code><\/pre>\n<p>\u0444\u043e\u0440\u043c\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0441\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e<\/p>\n<pre><code class=\"html\">&lt;input type=&quot;file&quot; href=&quot;\/&quot; multiple jasync \/&gt; &lt;div type=&quot;file&quot; href=&quot;\/&quot; multiple jasync&gt;\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043b&lt;\/div&gt; &lt;div href=&quot;\/&quot; jasync dropfile&gt;\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u043e\u043d\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440&lt;\/div&gt; <\/code><\/pre>\n<p>\u0444\u0430\u0439\u043b\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0441\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e<\/p>\n<pre><code class=\"html\">&lt;a href=&quot;\/&quot; data=&quot;year=2013&month=5&quot; class=&quot;send&quot;&gt;\u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435&lt;\/a&gt; <\/code><\/pre>\n<p>\u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0441\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e<\/p>\n<p>  \u0418 \u0442\u0443\u0442 \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0432\u043e\u0437\u043d\u0438\u043a \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0435\u0441\u043b\u0438 \u0444\u043e\u0440\u043c\u0430 \u043d\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u0430 \u0437\u0430\u0447\u0435\u043c \u0435\u0451 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c, \u0430 \u0435\u0441\u043b\u0438 \u044f \u0445\u043e\u0447\u0443 \u0435\u0449\u0451 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b?<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0418 \u043d\u0430\u0447\u043d\u0451\u043c \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435  <\/p>\n<pre><code class=\"javascript\">$( '.send' ).bind( 'jasync.success', function( e, data ) { \t\/\/ data - \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 } ); <\/code><\/pre>\n<p>  \u041d\u0443 \u044d\u0442\u043e \u0436\u0435 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0435 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043c. \u041d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u043e.<\/p>\n<p>  \u0418 \u0442\u0443\u0442 \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 <a href=\"http:\/\/jquery-async.com\/js\/jquery.message.async.js\">jquery.message.async.js<\/a>, \u043d\u0430\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u043d\u043e \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u0418 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 jasync=\u00abmessage\u00bb  <\/p>\n<pre><code class=\"html\">&lt;form action=&quot;\/&quot; jasync=&quot;message&quot;&gt; \t&lt;input type=&quot;submit&quot; \/&gt; &lt;\/form&gt; <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:  <\/p>\n<pre><code class=\"javascript\">{ \tmessages: { \t\t{ \t\t\ttype: 'replace', \t\t\telem: '#myElem', \t\t\thtml: '\u0417\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c' \t\t}, \t\t{ \t\t\ttype: 'append', \t\t\telem: '.myClass', \t\t\thtml: '\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b' \t\t}, \t\t{ \t\t\ttype: 'delete', \t\t\telem: '.delElems' \t\t}, \t\t{ \t\t\tcallback: 'alert', \t\t\tcallback_params: [ '\u0417\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e' ] \t\t}, \t\t{ \t\t\ttype: 'openPopap', \/\/ \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432 jquery.message.ajax.js \u043d\u0430\u0434\u043e \u0432\u0430\u043c \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u043f\u0430\u043f\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u0443 \u0432\u0441\u0435\u0445 \u0440\u0430\u0437\u043d\u044b\u0435 \t\t\thtml: '...' \t\t} \t} } <\/code><\/pre>\n<p>  \u0438\u043b\u0438<\/p>\n<pre><code class=\"javascript\">{ \turl: '\u041f\u0435\u0440\u0435\u0439\u0438 \u043f\u043e \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443' } <\/code><\/pre>\n<p>  \u0418 \u0442\u0430\u043a \u0432 \u0431\u043e\u043b\u044c\u0448\u0435\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c ajax \u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/p>\n<p>  \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043c\u0435\u043d\u044f\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0435\u0441\u043b\u0438 \u0444\u043e\u0440\u043c\u0430 \u043d\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u0430:  <\/p>\n<pre><code class=\"javascript\">$( 'form' ).bind( 'jasync.beforeSend', function( ) { \tvar form = $( this ); \tif( !form.isValid() ) { \t\tform.jasync( 'stop', true ); \/\/\u041e\u0442\u043c\u0435\u043d\u044f\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \t}  \t\/\/ \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0438\u043f \u043f\u0440\u0438\u0441\u044b\u043b\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \tform.jasync( { \t\t'addData': { \t\t\tcount: 20, \t\t\ttypesend: 'send jasync' \t\t}, \t\t'dataType': 'json' \/\/ \u0422\u0438\u043f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \t} ); } ); <\/code><\/pre>\n<p>  \u041a\u043e\u0434 \u043d\u0430 php \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"php\">header( 'Content-type: text\/json' );  echo json_encode( array( \t'messages' =&gt; array( \t\tarray( \t\t\t'type' =&gt; 'replace', \t\t\t'elem' =&gt; '#myElem', \t\t\t'html' =&gt; '\u0417\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c' \t\t), \t\tarray( \t\t\t'type' =&gt; 'append', \t\t\t'elem' =&gt; '.myClass', \t\t\t'html' =&gt; '\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b' \t\t), \t\tarray( \t\t\t'type' =&gt; 'delete', \t\t\t'elem' =&gt; '.delElems' \t\t), \t\tarray( \t\t\t'callback' =&gt; 'alert', \t\t\t'callback_params' =&gt; array('\u0417\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e') \t\t) \t) ) ); <\/code><\/pre>\n<p>  \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0435\u0433\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <a href=\"http:\/\/jquery-async.com\/demo\/AsyncResponse.php\">AsyncResponse<\/a>  <\/p>\n<pre><code class=\"php\">$message = AsyncResponse::getInstance(); $message \t-&gt;add( AsyncResponse::REPLACE, '#myElem', '\u0417\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c' ) \t-&gt;add( AsyncResponse::APPEND, '.myClass', '\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b' ) \t-&gt;add( AsyncResponse::DELETE, '.delElems' ) \t-&gt;addCallback( 'console.log', '\u0417\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e', '!!!' ); \t\/\/-&gt;openPopup( '\u041a\u043e\u043d\u0442\u0435\u043d\u0442' )  $message-&gt;end(); <\/code><\/pre>\n<h5>\u0411\u0443\u0434\u044c\u0442\u0435 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u044b \u043a\u043e\u0433\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443 \u0432\u0430\u0441 \u043e\u0442\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0447\u0435\u0440\u0435\u0437 iframe, \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u043b\u0443\u0447\u0430\u044f\u0445:<\/h5>\n<p>  <\/p>\n<ol>\n<li>\u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u043e\u043c\u0435\u043d.<br \/>   \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u0446\u0435\u043b\u044f\u0445 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0432\u043e \u0434\u043e\u043c\u0435\u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432 iframe,<br \/>   \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438 \u043e\u0442\u0432\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u043d\u0430 \u0432\u0430\u0448 \u0434\u043e\u043c\u0435\u043d, \u0430 \u0442\u0430\u043c \u0443\u0436\u0435 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442.   <\/li>\n<li> \u041a\u043e\u0433\u0434\u0430 \u0443 \u0432\u0430\u0441 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u0430\u0440\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445 \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 FormData<br \/>   \u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u0447\u0435\u0440\u0435\u0437 iframe \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u0431\u0443\u0434\u0443\u0442 \u0442\u0435\u0433\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 div),<br \/>   \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0434\u043e\u0431\u0430\u0432\u0438\u0442 \u043b\u0438\u0448\u043d\u0438\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0442\u0435\u0433\u0438 \u0438 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c json \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f.<br \/>   \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u0431\u0435\u0437 \u0442\u0435\u0433\u043e\u0432, \u043b\u0438\u0431\u043e \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0438 \u043f\u0440\u0438 \u043f\u0440\u0438\u0451\u043c\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438   <\/li>\n<\/ol>\n<h3>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0444\u0430\u0439\u043b\u043e\u0432<\/h3>\n<p>  <habracut text=\"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/jquery-async.com\/img\/load-photo.jpg\" alt=\"image\"\/><br \/>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 Drag and Drop \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 Drag and Drop.<\/p>\n<p>  \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u0441\u044f \u043e\u043a\u043d\u043e \u0441 \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0444\u0430\u0439\u043b\u043e\u0432  <\/p>\n<pre><code class=\"html\">&lt;a href=&quot;\/image\/save\/&quot; name=&quot;image&quot; multiple jasync&gt;\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043b\u044b&lt;\/a&gt; <\/code><\/pre>\n<p>  \u0438\u043b\u0438 \u0431\u043b\u043e\u043a \u043a\u0443\u0434\u0430 \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435  <\/p>\n<pre><code class=\"html\">&lt;div href=&quot;\/image\/save\/&quot; name=&quot;image&quot; dropfile jasync&gt;\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0444\u0430\u0439\u043b\u044b&lt;\/div&gt; <\/code><\/pre>\n<p>  \u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/p>\n<pre><code class=\"javascript\">$( document ).on( 'jasync.beforeSend', 'a[type=file]', function( e, imgs ) { \t\/\/ \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \t$( this ).jasync( { \t\t'addData': { \t\t\tcount: 20 \t\t}, \t\t'maxSize': 20000 \/\/ \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u043e\u0432 \t} );  \tif( imgs.nosupport ) { \t\t$( '#answer' ).html( '\u0418\u0434\u0451\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 iframe, \u043d\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u0440\u0435\u0434 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f...' ); \t\treturn; \t}                  \tfor( var i = 0, l = imgs.length; i &lt; l; i++ ) { \t\timgs[ i ] \t\t\t\/\/ \u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043a\u043e\u0433\u0434\u0430 \u0444\u0430\u0439\u043b \u0433\u043e\u0442\u043e\u0432 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \t\t\t.bind( 'jasync.load', function( e, file ) { \t\t\t\t\/\/ file - \u0444\u0430\u0439\u043b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 base64 \t\t\t\t$( 'body' ).append( '&lt;img src=&quot;' + file + '&quot; \/&gt;' );   \t\t\t\t$( this ) \t\t\t\t\t\/\/ \u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \t\t\t\t\t.bind( 'jasync.uploadProgress', function( e, percent, obj ) { \t\t\t\t\t\t\/\/ percent - \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \t\t\t\t\t} ) \t\t\t\t\t\/\/ \u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \t\t\t\t\t.bind( 'jasync.success', function( e, data ) { \t\t\t\t\t\t\/\/console.log( data ); \t\t\t\t\t} ) \t\t\t\t\t\/\/ \u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \t\t\t\t\t.bind( 'jasync.error', function() { \t\t\t\t\t\t \t\t\t\t\t} ); \t\t\t} ); \t}  } ).on( 'jasync.success', 'a[type=file]', function( e, data ) { \t\/\/ \u041b\u043e\u0432\u0438\u043c \u043e\u0442\u0432\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0447\u0435\u0440\u0435\u0437 iframe \t$( '#answer' ).html( data ); } ); <\/code><\/pre>\n<p>  \u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <a href=\"http:\/\/jquery-async.com\/download\/\">http:\/\/jquery-async.com\/download\/<\/a><br \/>  \u0418\u043b\u0438 \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d, \u0447\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0442\u043e <a href=\"https:\/\/gist.github.com\/tramak\/5394007\">\u0437\u0434\u0435\u0441\u044c<\/a> \t\t\t \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/177069\/\"> http:\/\/habrahabr.ru\/post\/177069\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0418\u0442\u0430\u043a ajax \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e, \u0432\u0441\u0435 \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438 \u0438\u0445 \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u0442\u044c, \u043d\u043e \u0432\u0441\u0451 \u0436\u0435 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<br \/>  <a href=\"http:\/\/jquery-async.com\/js\/jquery.async.js\">jquery.async.js<\/a><\/p>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"html\">&lt;form action=&quot;\/&quot; jasync&gt; \t&lt;input type=&quot;submit&quot; \/&gt; &lt;\/form&gt; <\/code><\/pre>\n<p>\u0444\u043e\u0440\u043c\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0441\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e<\/p>\n<pre><code class=\"html\">&lt;input type=&quot;file&quot; href=&quot;\/&quot; multiple jasync \/&gt; &lt;div type=&quot;file&quot; href=&quot;\/&quot; multiple jasync&gt;\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043b&lt;\/div&gt; &lt;div href=&quot;\/&quot; jasync dropfile&gt;\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u043e\u043d\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440&lt;\/div&gt; <\/code><\/pre>\n<p>\u0444\u0430\u0439\u043b\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0441\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e<\/p>\n<pre><code class=\"html\">&lt;a href=&quot;\/&quot; data=&quot;year=2013&#038;month=5&quot; class=&quot;send&quot;&gt;\u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435&lt;\/a&gt; <\/code><\/pre>\n<p>\u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0441\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e<\/p>\n<p>  \u0418 \u0442\u0443\u0442 \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0432\u043e\u0437\u043d\u0438\u043a \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0435\u0441\u043b\u0438 \u0444\u043e\u0440\u043c\u0430 \u043d\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u0430 \u0437\u0430\u0447\u0435\u043c \u0435\u0451 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c, \u0430 \u0435\u0441\u043b\u0438 \u044f \u0445\u043e\u0447\u0443 \u0435\u0449\u0451 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b?  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-177069","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/177069","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=177069"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/177069\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=177069"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=177069"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=177069"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}