Php 当用户在文本框内按Enter键时更新MySQL数据库
我正在使用PHP和MySQL,希望在用户在文本字段中输入新值,然后按enter键时更新我的数据库Php 当用户在文本框内按Enter键时更新MySQL数据库,php,mysql,database,textbox,Php,Mysql,Database,Textbox,我正在使用PHP和MySQL,希望在用户在文本字段中输入新值,然后按enter键时更新我的数据库 有人知道这方面的教程/文章吗?你可以在www.w3schools.com上找到很棒的教程和解释 以下是关于如何在PHP中与MySQL数据库交互的教程: 这些是关于如何在PHP中与活动网页交互的教程: 如果将两者结合起来,您可以实现您想要的功能=)Yeh在w3schools上,您将获得所有教程,要检测,请按enter键代码如下: *********************************
有人知道这方面的教程/文章吗?你可以在www.w3schools.com上找到很棒的教程和解释 以下是关于如何在PHP中与MySQL数据库交互的教程:
这些是关于如何在PHP中与活动网页交互的教程:
如果将两者结合起来,您可以实现您想要的功能=)Yeh在w3schools上,您将获得所有教程,要检测,请按enter键代码如下:
***************************************************************************
*Pressing the "ENTER Key" or the "RETURN Key" usually generates
*two characters: i.e., the "carriage return" character followed by
*the "line feed" character. Regular expressions will be used to
*check this character combination to identify whether the "ENTER
*Key" or the RETURN Key" is pressed or not.
****************************************************************************/
if(this.Text.match(/\r\n/))
{
Alert("Enter is not allowed!\nPlease use the command button.");
this.Text = this.Text.replace( /\r\n/gi,"");
// good place to fire off a CommandButton
}