| |

VerySource

 Forgot password?
 Register
Search
View: 700|Reply: 3

How to send a message on a web page like the ctrl + enter shortcut of qq? ?

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-16 18:40:01
| Show all posts |Read mode
Can it be achieved?
How can I achieve it? ?
Reply

Use magic Report

0

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-21 19:00:02
| Show all posts
Monitor the keyboard. When the specified key is clicked, an event is triggered.
If it is information in the network, it can be submitted directly through the B / S framework.
For information across networks, use WebService.
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-1-21 21:54:01
| Show all posts
<FORM id = "Form1" method = "post" runat = "server">
<ASP: TEXTBOX onkeydown = "javascript: GoKeyDown ();" id = "TextBox3" runat = "server" TextMode = "MultiLine"> </ ASP: TEXTBOX>
<ASP: BUTTON id = "Button1" runat = "server"
Text = "Button"> </ ASP: BUTTON> </ FORM>

<SCRIPT language = "javascript">
<!-
 function GoKeyDown ()
 {
Ranch
if (event.ctrlKey&&event.keyCode == 13)
{
Form1.Button1.click ();
}
 }
//->
</ SCRIPT>
Reply

Use magic Report

0

Threads

73

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-1-22 10:54:01
| Show all posts
<input type = text onkeypress = "if (event.ctrlKey&&window.event.keyCode == 13) document.yourForm.submit ();">
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list