Use the keyboard to implement page jumps. To change the location back to the address you want to jump, the example is to use the direction key to achieve MovableType log page of the previous, after a jump code.
code is as follows |
copy code |
<script Language=javascript> document.onkeydown = chang_page; function Chang_page () { if (Event.keycode = 37 | | Event.keycode = location = ' <MTEntryPrevious>< $MTEntryPermalink $></mtentryprevious> '; if (Event.keycode = | | event.keycode = =) Location = ' <mtentrynex t>< $MTEntryPermalink $></mtentrynext> ' } </script> |
/tbody>
P.S. Numeric code corresponding to commonly used keys:
A (65), B (66), C (67), D (68), E (69), F (70), G (71), H (72), I (73), J (74), K (75), L (76), M (77), N (78), O (79), P (80), Q (81), R (82), S (83), T (84), U (85), V (86), W (87), X (88), Y (89), Z (90), 0 (48), 1 (49), 2 (50), 3 (51), 4 (52), 5 (53), 6 (54), 7 (55), 8 (56), 9 (57), The top (38), lower (40), left (37), and right (39) of the direction key.
Some common page jump codes
The code is as follows |
Copy Code |
First type: <script language= "javascript" type= "Text/javascript" > window.location.href= "Login.jsp?backurl=" +WINDOW.LOCATION.HREF; </script> The second type: <script language= "JavaScript" > Alert ("return"); Window.history.back (-1); </script> The third type: <script language= "JavaScript" > Window.navigate ("top.jsp"); </script> The fourth kind: <script language= "JavaScript" > self.location= ' top.htm '; </script> The fifth kind: <script language= "JavaScript" > Alert ("Illegal access!) "); top.location= ' xx.jsp '; </script> |
Finally attach a CTRL + Return to submit the form
code is as follows |
copy code |
<script Language=javascript> ie = (document.all)? True:false if (ie) { function ctlent (eventobject) {if ( Event.ctrlkey && window.event.keycode==13) {this.document.form1.submit ();}} } </script> <form action= "www.111cn.net" Method=post name=form1> <textarea cols=95 Name =content rows=12 wrap=virtual onkeydown=ctlent () Ctrl+enter submit content Information </textarea> <input type= Submit Value= "Submit" Name=submit> </form> |