


How to replace Chinese commas and spaces with English commas in the background keywords of Imperial CMS7.0
How to replace Chinese commas and spaces with English commas in the background keywords of Empire CMS7.0?
Function introduction: When adding keywords to an article, replace the entered Chinese commas "," and spaces with English commas "," in real time. It avoids having to manually enter or change to English commas every time. It is more convenient to type spaces.
It is recommended to study "Empire cms tutorial"
Modification method:
Empire CMS background-->System settings-->Manage data table -->News system data table (phome_ecms_news) [Management field] -->special.field [Modify system field]
Replace this sentence in "Input form replaces html code":
The code is as follows:
<input name="keyboard" type="text" size="52" value="<?=stripSlashes($r[keyboard])?>">
Modify it to the following sentence:
The code is as follows:
<input name="keyboard" type="text" size="52" value="<?=stripSlashes($r[keyboard])?>" onkeyup="this.value=this.value.replace(/,/g,',').replace(/ /g,',');">
The above code realizes the Chinese comma "," in the input keyword and spaces " " are replaced with English commas ",". If you only want to replace Chinese commas, use the following code:
The code is as follows:
onkeyup="ti.value=keyboard.value.replace(/,/g,',');"
Or only replace spaces:
The code is as follows:
onkeyup="ti.value=keyboard.value.replace(/ /g,',');"
Note: This article only changes the keywords added to the news system data table. You can refer to this method to modify the article system data table or other data tables.
The above is the detailed content of How to replace Chinese commas and spaces with English commas in the background keywords of Imperial CMS7.0. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

WebStorm Mac version
Useful JavaScript development tools

Atom editor mac version download
The most popular open source editor

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.
