{"id":2198,"date":"2012-06-11T17:55:55","date_gmt":"2012-06-11T15:55:55","guid":{"rendered":"http:\/\/blog.unelink.es\/?p=2198"},"modified":"2012-06-12T08:33:34","modified_gmt":"2012-06-12T06:33:34","slug":"evitar-o-anular-la-tecla-esc","status":"publish","type":"post","link":"https:\/\/hosting.airetech.es\/blog\/wiki\/evitar-o-anular-la-tecla-esc\/","title":{"rendered":"Evitar o anular la tecla ESC"},"content":{"rendered":"<p>Un motivo para querer anular la tecla ESC es cuando lanzamos un formulario y no queremos que su ejecucion sea detenida mediante la pulsaci\u00f3n de la tecla ESC, la cual anulamos de la siguiente manera:<\/p>\n<pre>\r\n$(document).ready( function()\r\n{\r\n&nbsp;&nbsp;&nbsp;&nbsp;$(document).keypress(function(e)\r\n&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (e.keyCode == 27)\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return false;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;&nbsp;&nbsp;});\r\n});\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"Un motivo para querer anular la tecla ESC es cuando lanzamos un formulario y no queremos que su ejecucion sea detenida mediante la pulsaci\u00f3n de la tecla ESC, la cual anulamos de la siguiente manera: $(document).ready( function() { &nbsp;&nbsp;&nbsp;&nbsp;$(document).keypress(function(e) &nbsp;&nbsp;&nbsp;&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (e.keyCode == 27) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return false; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;}); });","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[132,6],"tags":[142,133],"class_list":["post-2198","post","type-post","status-publish","format-standard","hentry","category-javascript","category-wiki","tag-esc","tag-javascript-2","cat-132-id","cat-6-id"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts\/2198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/comments?post=2198"}],"version-history":[{"count":5,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts\/2198\/revisions"}],"predecessor-version":[{"id":2288,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts\/2198\/revisions\/2288"}],"wp:attachment":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/media?parent=2198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/categories?post=2198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/tags?post=2198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}