{"id":164137,"date":"2012-12-27T15:01:02","date_gmt":"2012-12-27T11:01:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=164137"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=164137","title":{"rendered":"<span class=\"post_title\">\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u043b\u0435\u0439 \u0432 \u0432\u0435\u0431-\u0444\u043e\u0440\u043c\u0435<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/658\/e9d\/077\/658e9d077cbc2f5449f9373ed940ca48.png\"\/><\/p>\n<p>  \u0418\u043d\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u0445\u043e\u0447\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c, \u043d\u043e \u0434\u0430\u0442\u044c \u0435\u043c\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e. \u0421\u043a\u0430\u0436\u0435\u043c, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 \u0438\u0437 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439, \u0438\u043b\u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0440\u043e\u0441 \u0441 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0447\u0438\u0441\u043b\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432.<\/p>\n<p>  \u041e\u0434\u0438\u043d \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u2014 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0441\u044b\u0440\u043e\u043c \u0432\u0438\u0434\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0435\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u043f\u0440\u043e\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<br \/>  \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0439 <a href=\"http:\/\/habrahabr.ru\/post\/151104\/\">\u043f\u043b\u0430\u0433\u0438\u043d jQuery<\/a> \u0438 \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 JSON.<br \/>  \u0418\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u043e\u043b\u0435\u0439 \u043f\u043e \u0444\u043b\u0430\u0433\u0430\u043c.<\/p>\n<p>  <a name=\"habracut\"><\/a><br \/>  \u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u043b\u0435\u0439 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u2014 \u043a\u0430\u043a \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440? \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0435\u0441\u044f \u043f\u0440\u0438 \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u0446\u0438\u043a\u043b, \u043b\u0438\u0431\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432\u044b. \u041d\u043e \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u043e\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043b\u044e\u0447 \u0441 \u043f\u0440\u0435\u0434\u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c \u0438, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u2014 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0438 \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439. \u0412 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c html-\u0448\u0430\u0431\u043b\u043e\u043d \u043f\u043e\u043b\u044f \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u043d\u0443\u0436\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0440\u0430\u0437. \u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u2014 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u043b\u0435. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u0430\u043a \u0441\u043a\u0440\u0438\u043f\u0442 \u0443\u0437\u043d\u0430\u0435\u0442, \u0432 \u043a\u0430\u043a\u043e\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u043b\u043e\u043a \u043c\u044b \u0442\u043a\u043d\u0443\u043b\u0438, \u0436\u0435\u043b\u0430\u044f \u0443\u0431\u0440\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430? \u041c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 DOM, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0439\u0434\u0435\u0442 \u043f\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u043c\u0443 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0434\u043e \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u0438 \u043e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442 \u0435\u0433\u043e. \u0418\u043b\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u043b\u0430\u0433\u0438: \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 1, \u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u0431\u043b\u043e\u043a \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d, \u0430 \u0435\u0441\u043b\u0438 0 \u2014 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0433\u043e \u0443\u0434\u0430\u043b\u0438\u043c.<\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439 \u043e\u0434\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u0435\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c \u043f\u043b\u044e\u0441 \u043e\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"javascript\">\t&lt;script&gt; \t\tvar i = 0; \/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a \t\tvar emp_arr = new Array(); \t\tfunction emp_list(flag, emp_arr) \t\t{ \t\t\tvar emp_div = document.getElementById('employees'); \/\/ \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \t\t\t\t \t\t\temp_div.innerHTML = ''; \/\/ \u041e\u0447\u0438\u0449\u0430\u0435\u043c \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442  \t\t\tif('+' == flag) \t\t\t{ \t\t\t\ti++; \t\t\t\temp_arr[i] = 1; \/\/ \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \t\t\t} \t\t\telse \t\t\t{\t \t\t\t\tvar sum = 0; \/\/ \u041d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u043c \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 - \u0435\u0441\u043b\u0438 \u0441\u0443\u043c\u043c\u0430 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0440\u0430\u0432\u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0435, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u043c \t\t\t\tfor(var z=0; z&lt;=emp_arr.length; z++) \t\t\t\t{ \t\t\t\t\t\tif(1 == emp_arr[z]) {sum++;} \t\t\t\t}\t\t\t\t\t \t\t\t\tif(1 != sum) {emp_arr[flag] = 0;} \t\t\t} \t\t\tfor(var z=0; z&lt;=emp_arr.length; z++) \t\t\t{ \t\t\t\t\/\/ \u0414\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432. \u0417\u0430\u0442\u0435\u043c \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0435 $_POST \t\t\t\tvar emp_field='&lt;p&gt;&lt;input type=&quot;text&quot; name=&quot;family_name[]&quot; value=&quot;\u0424\u0430\u043c\u0438\u043b\u0438\u044f&quot; size=&quot;20&quot; \/&gt; &lt;input type=&quot;text&quot; name=&quot;first_name[]&quot; value=&quot;\u0418\u043c\u044f&quot; size=&quot;20&quot; \/&gt; &lt;input type=&quot;text&quot; name=&quot;fathers_name[]&quot; value=&quot;\u041e\u0442\u0447\u0435\u0441\u0442\u0432\u043e&quot; size=&quot;20&quot; \/&gt; | \u041d\u043e\u043c\u0435\u0440 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430: &lt;input type=&quot;text&quot; name=&quot;tel_num[]&quot; value=&quot;+7(999) 999-9999&quot; size=&quot;20&quot; \/&gt; | &lt;span class=&quot;link&quot; onclick=&quot;emp_list(\\''+z+'\\', emp_arr);&quot;&gt;\u0423\u0434\u0430\u043b\u0438\u0442\u044c&lt;\/span&gt;&lt;\/p&gt;'; \t\t\t\tif(1 == emp_arr[z]) {emp_div.innerHTML+=emp_field;}  \t\t\t} \t\t} \t&lt;\/script&gt; <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430, \u043a\u043d\u043e\u043f\u043a\u0443 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"html\">\t&lt;div id=&quot;employees&quot;&gt; \t\t&lt;!-- \u0417\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u044f \u0444\u043e\u0440\u043c\u044b --&gt; \t\t&lt;script&gt; \t\t\temp_list('+', emp_arr); \t\t&lt;\/script&gt; \t&lt;\/div&gt; \t&lt;p&gt;&lt;span class=&quot;link&quot; onclick=&quot;emp_list('+', emp_arr);&quot;&gt;\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430&lt;\/span&gt;&lt;\/p&gt; <\/code><\/pre>\n<p>  \u0421\u0442\u0438\u043b\u0438 \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043e\u043a:<\/p>\n<pre><code class=\"css\">\t&lt;style&gt; \t.link { color: #0069c4; cursor: pointer;} \t.link:hover {text-decoration: underline;} \t&lt;\/style&gt; <\/code><\/pre>\n<p>  \u0413\u043e\u0442\u043e\u0432\u043e<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"html\">&lt;!DOCTYPE html&gt; &lt;html&gt;   &lt;head&gt;          &lt;title&gt;\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u043b\u0435\u0439 \u0432 \u0432\u0435\u0431-\u0444\u043e\u0440\u043c\u0435&lt;\/title&gt; \t&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=utf-8&quot; \/&gt; \t \t&lt;style&gt; \t.link { color: #0069c4; cursor:pointer;} \t.link:hover {text-decoration:underline;} \t&lt;\/style&gt; \t \t&lt;script&gt; \t\tvar i = 0; \/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a \t\tvar emp_arr = new Array(); \t\tfunction emp_list(flag, emp_arr) \t\t{ \t\t\tvar emp_div = document.getElementById('employees'); \/\/ \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \t\t\t\t \t\t\temp_div.innerHTML = ''; \/\/ \u041e\u0447\u0438\u0449\u0430\u0435\u043c \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442  \t\t\tif('+' == flag) \t\t\t{ \t\t\t\ti++; \t\t\t\temp_arr[i] = 1; \/\/ \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \t\t\t} \t\t\telse \t\t\t{\t \t\t\t\tvar sum = 0; \/\/ \u041d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u043c \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 - \u0435\u0441\u043b\u0438 \u0441\u0443\u043c\u043c\u0430 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0440\u0430\u0432\u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0435, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u043c \t\t\t\tfor(var z=0; z&lt;=emp_arr.length; z++) \t\t\t\t{ \t\t\t\t\t\tif(1 == emp_arr[z]) {sum++;} \t\t\t\t}\t\t\t\t\t \t\t\t\tif(1 != sum) {emp_arr[flag] = 0;} \t\t\t} \t\t\tfor(var z=0; z&lt;=emp_arr.length; z++) \t\t\t{ \t\t\t\t\/\/ \u0414\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432. \u0417\u0430\u0442\u0435\u043c \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0435 $_POST \t\t\t\tvar emp_field='&lt;p&gt;&lt;input type=&quot;text&quot; name=&quot;family_name[]&quot; value=&quot;\u0424\u0430\u043c\u0438\u043b\u0438\u044f&quot; size=&quot;20&quot; \/&gt; &lt;input type=&quot;text&quot; name=&quot;first_name[]&quot; value=&quot;\u0418\u043c\u044f&quot; size=&quot;20&quot; \/&gt; &lt;input type=&quot;text&quot; name=&quot;fathers_name[]&quot; value=&quot;\u041e\u0442\u0447\u0435\u0441\u0442\u0432\u043e&quot; size=&quot;20&quot; \/&gt; | \u041d\u043e\u043c\u0435\u0440 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430: &lt;input type=&quot;text&quot; name=&quot;tel_num[]&quot; value=&quot;+7(999) 999-9999&quot; size=&quot;20&quot; \/&gt; | &lt;span class=&quot;link&quot; onclick=&quot;emp_list(\\''+z+'\\', emp_arr);&quot;&gt;\u0423\u0434\u0430\u043b\u0438\u0442\u044c&lt;\/span&gt;&lt;\/p&gt;'; \t\t\t\tif(1 == emp_arr[z]) {emp_div.innerHTML+=emp_field;}  \t\t\t} \t\t} \t&lt;\/script&gt; \t   &lt;\/head&gt;   &lt;body&gt;    \t&lt;h1&gt;\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u0445&lt;\/h1&gt;  \t&lt;div id=&quot;employees&quot;&gt; \t\t&lt;!-- \u0417\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u044f \u0444\u043e\u0440\u043c\u044b --&gt; \t\t&lt;script&gt; \t\t\temp_list('+', emp_arr); \t\t&lt;\/script&gt; \t&lt;\/div&gt; \t&lt;p&gt;&lt;span class=&quot;link&quot; onclick=&quot;emp_list('+', emp_arr);&quot;&gt;\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430&lt;\/span&gt;&lt;\/p&gt;      &lt;\/body&gt; &lt;\/html&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u0438\u043c\u0435\u043d\u0430\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u2014 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d \u0432\u044b\u0432\u043e\u0434\u0430. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043b\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0438 \u043f\u043e\u043b\u0435\u0439.<\/p>\n<p>  <habracut\/>    \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\/164137\/\"> http:\/\/habrahabr.ru\/post\/164137\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/658\/e9d\/077\/658e9d077cbc2f5449f9373ed940ca48.png\"\/><\/p>\n<p>  \u0418\u043d\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u0445\u043e\u0447\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c, \u043d\u043e \u0434\u0430\u0442\u044c \u0435\u043c\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e. \u0421\u043a\u0430\u0436\u0435\u043c, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 \u0438\u0437 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439, \u0438\u043b\u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0440\u043e\u0441 \u0441 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0447\u0438\u0441\u043b\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432.<\/p>\n<p>  \u041e\u0434\u0438\u043d \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u2014 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0441\u044b\u0440\u043e\u043c \u0432\u0438\u0434\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0435\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u043f\u0440\u043e\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<br \/>  \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0439 <a href=\"http:\/\/habrahabr.ru\/post\/151104\/\">\u043f\u043b\u0430\u0433\u0438\u043d jQuery<\/a> \u0438 \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 JSON.<br \/>  \u0418\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u043e\u043b\u0435\u0439 \u043f\u043e \u0444\u043b\u0430\u0433\u0430\u043c.<\/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-164137","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/164137","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=164137"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/164137\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=164137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=164137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=164137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}