web front end
-
Use jQuery to write a ChatGPT typing effect In recent years, with the continuous development of technology, artificial intelligence (AI) has gradually become a hot topic. Among them, as a large language model, ChatGPT has become increasingly popular in China. Its natural language processing function allows users to communicate more naturally, and it can also be used as a core algorithm in various AI products and services. AI has been widely used and developed rapidly, from smart home to automatic driving, medical and other fields. For example, researchers at MIT found a super antibiotic halic by using AI system two thousand and twenty-three one thousand seven hundred and ninety-two -
Zblog (non js) calls the method of discuz post Step 1: Create new empty files news01.html and news02.html in the zblog directory (taking b2c theme as an example)/zb_users/theme/b2c/include directory. Step 2: Copy the following code, save it as news.php, and upload it to the source/include/cron/directory of the discuz program.<? phpif(! defined('IN_DISCUZ... two thousand and twenty four thousand three hundred and eighty-four -
The difference between javascript execution before and after elements When writing native js, we found that the script cannot be executed before the dom element, and it needs to be placed after the dom element to be effective. Because the js is executed immediately after loading, we put the code in the window.onload function body, and let the page be loaded completely before execution. Window. onload=function() {//Execute when the page is loaded} The jQuery code placed before and after the page element has no impact on the execution effect two thousand and nineteen four thousand eight hundred and twenty-four -
Record the optimization process of simple and complex switching font When making zblog themes, in order to increase the function of simple and complex switching, find a simple and complex font database data on the Internet. Because zblog themes use Microsoft Yahei font, some traditional characters are the same as simplified characters. In order to eliminate the same characters, the specific idea is to first change the simplified and traditional characters to take up a single line for each Chinese character, Then find the same item in the two columns of data in Excel and delete it. After the format is restored by Sublime, the final optimized text is obtained,. The detailed method is as follows: 1. First two thousand and seventeen six thousand two hundred and fifty-three -
Example of jquery price switching with specifications Nowadays, when we browse the product page of e-commerce website, we often see the display of product specifications and prices. Different specifications correspond to different prices. For example, on the hot sale theme page of our website, click on the specifications to display the corresponding prices. The implementation method is very simple, so we wrote a responsive example page to show that prices switch with the specifications. Effect preview: jquery code: $(function() { two thousand and seventeen seven thousand nine hundred and twenty-seven -
Query tool for prohibited words in the new advertising law The new Advertising Law, which came into force on September 1, 2015, clearly stipulates that advertisements shall not contain false or misleading content, and shall not deceive or mislead consumers. It is prohibited to publish tobacco advertisements in mass media or public places; It is prohibited to use advertisements and public service advertisements of other goods or services to publicize the names, trademarks and other contents of tobacco products. This website has written a set of convenient query tools for young partners engaged in e-commerce industry. At present, 420 words have been included. Forbidden words query tools: https://zbp.toyean.com/... two thousand and seventeen twenty-two thousand one hundred and sixty-six -
Two methods of generating order number in PHP When developing a project, there is often a need to generate an order number. Here are two common methods to generate a 20 digit order number. Method 1: The following code is 14 bits of current time plus 6 bits of random number. If you want to increase or decrease the number of bits, just modify the number 6 at the end.<? phpfunction build_order_no(){ return date('YmdHis&#... two thousand and seventeen seven thousand one hundred and fifteen -
Setting method of apmserv pseudo static APMServ is a one click software to build a PHP environment, which is convenient for developing and debugging local PHP programs. In order to support pseudo static when developing zblog themes or using zblog PHP programs, you need to modify the Apache configuration file. By default, the software does not support pseudo static, and you need to manually modify it. The method is as follows: Open the APMServ software (right click the administrator to run it) >Apache Settings>Modify the configuration file. In the open httpd.conf file, find the file with two thousand and seventeen six thousand two hundred and forty-seven -
Three methods for jQuery to determine whether the checkbox is selected The check box of the form is often judged in the project, and the following three common methods are summarized two thousand and seventeen six thousand six hundred and seventy-three -
Two Methods of Domain Name Authorization in PHP 01. Online verification of domain name authorization: Client code:<? Php//Get the domain name prefix without port number $servername=trim ($_SERVER ['SERVER_NAME '])// Get the server authorization file verification $verifyurl=file_get_contents (&# 39 two thousand and sixteen fifteen thousand four hundred and eighty-six -
Three methods for JQuery to cancel event bubbling 1. Cancel the default behavior and prevent the event from bubbling by returning false$ (element).click(function(){return false;}); 2. Cancel the default behavior by using the preventDefault() method$ (element).click(function(e){e.preventDefau... two thousand and sixteen nine thousand three hundred and twelve -
Right column of e-commerce website Nowadays, more and more websites have added sidebars, especially e-commerce websites, such as Vipshop, Tmall, JD, JumeiYoupin, etc., which use traditional sidebars to indicate with icons, making website navigation clear at a glance, allowing users to focus on side navigation at a glance, achieving good interaction with users and increasing PV, It also shows the noble quality of the website. The following is our sidebar effect. The core code is as follows: LESS: @ c two thousand and sixteen twelve thousand four hundred and ninety-four -
Sort out common codes of Tmall JD Dangdang stores Taobao C store 1920 full screen code: two thousand and sixteen eight thousand five hundred and thirty-three -
Tuoyuan zblogphp Topic Tag Assistant V1.0 Release Tuoyuan zblogphp topic assistant is a software developed according to the requirements of zbp topic production, covering the commonly used topic tags of zblogphp, so that the theme production can achieve twice the result with half the effort. Tuoyuan zbp theme assistant is green software, pure and non-toxic two thousand and fourteen eighteen thousand two hundred and eleven -
The method of implementing classified search in zblog There are many ways for zblog to implement classified search (nonsense). One common way is that there are classified search plug-ins in the application center. After installation and enabling, set the generated code, which can be written into the sidebar or put into the theme file for use; Another method is to implement classification search by YTCMS two thousand and fourteen ten thousand three hundred and fifty-nine -
Change div into textarea attribute "contenteditable" Today, I checked the implementation effect of arrow on the lovers' home page of QQ Space. I accidentally found that the text field uses the "content editable" attribute, making div become the textarea effect, which can easily solve the problem of text box adapting height with content, Content editable is a new attribute of HTML5, and it is no inferior in IE browser. Don't worry about compatibility two thousand and fourteen seventeen thousand eight hundred and twenty -
Tutorial on using commodity template code of Tuoyuan JD store The activity page of Jingdong store decoration is designed with a red commodity layout, and a set of templates is made with reference to Yi Xun's product list two thousand and thirteen twenty-two thousand five hundred and seventy-two -
JQuery implements the effect of mouse sliding delay display Web developers sometimes use delayed user interaction events, such as the product display on the home page of JumeiYoupin website. When the mouse moves into the product for one second, the product details will be displayed, instead of the user's mouse pointer just moving into the element to display the details. For users who do not want to display details, it achieves friendly interaction, Next, we will use jQuery's timer setTimeout two thousand and thirteen eighteen thousand eight hundred and two