pegasus3009
07-03-2008, 10:42 AM
I have 4 forms in a PHP page, I want when an user press arrow key on keyboard: up,left,right,down. The browser will run every forms as below (no need click button as normal):
Up: ==>
<FORM action=$base_url/......&act=move&move=up method=post><input type=submit name=Submit VALUE="Move Up"></form>
Left ==>
<FORM action=$base_url/......&act=move&move=left method=post><input type=submit name=Submit VALUE="Move Left"></form>
Right ==>
<FORM action=$base_url/......&act=move&move=right method=post><input type=submit name=Submit VALUE="Move Right"></form>
Down ==>
<FORM action=$base_url/......&act=move&move=down method=post><input type=submit name=Submit VALUE="Move Down"></form>
I think we will use javascript.
Thanks you.
Up: ==>
<FORM action=$base_url/......&act=move&move=up method=post><input type=submit name=Submit VALUE="Move Up"></form>
Left ==>
<FORM action=$base_url/......&act=move&move=left method=post><input type=submit name=Submit VALUE="Move Left"></form>
Right ==>
<FORM action=$base_url/......&act=move&move=right method=post><input type=submit name=Submit VALUE="Move Right"></form>
Down ==>
<FORM action=$base_url/......&act=move&move=down method=post><input type=submit name=Submit VALUE="Move Down"></form>
I think we will use javascript.
Thanks you.