Instructions for the use of executable code that does not execute properly
Updated: May 13, 2010 01:01:21 Author:
Script home website In order to facilitate everyone to quickly view the effect, as long as you run the code that may see the effect.
However, with some effects, it is necessary to introduce external JS code (external js is generally jquery and other frameworks or some js code that needs to be introduced, in fact, as long as there is <script src="js path "></script> in the running code, it is an external introduction of js), leading to many friends who are not very familiar with the code. Feel this code is wrong, can not be executed, here is a simple explanation, let everyone do not understand the error.
Here is an example of an article introducing external Js.
https://www.jb51.net/article/23280.htm
When opened, the following code is found
So after clicking the run code, it is found that the page does not execute according to the instructions. In fact, the code is run here, and the external js is not loaded. Here is jquery.
The following is a supplementary note:
Many friends look at our code, found that our code is not like the code on other websites, can be highlighted, in fact, one batch modification is more troublesome, two if that may make many friends can not copy the code normally, if you like to highlight, you can copy the code to some editor or tools with formatted code to achieve.
Script Home special in the right side of the article for you to organize some js or other language formatting tools.
You can choose according to your needs.
CSS Online Compression Formatting (Chinese)
css Formatting Tool (English)
CSS shaping formatting
JavaScript formatting tool
jsbeautifier Js Formatting Tool
php Formatting Tool (English)
HTML/JS interconversion tool
javascript pack encryption and compression tool
JS Minifier compression
JS obfuscation tool
Online JS script validator error
JavaScript regular expression online testing tool
Here is an example of an article introducing external Js.
https://www.jb51.net/article/23280.htm
When opened, the following code is found
So after clicking the run code, it is found that the page does not execute according to the instructions. In fact, the code is run here, and the external js is not loaded. Here is jquery.
The following is a supplementary note:
Many friends look at our code, found that our code is not like the code on other websites, can be highlighted, in fact, one batch modification is more troublesome, two if that may make many friends can not copy the code normally, if you like to highlight, you can copy the code to some editor or tools with formatted code to achieve.
Script Home special in the right side of the article for you to organize some js or other language formatting tools.
You can choose according to your needs.
CSS Online Compression Formatting (Chinese)
css Formatting Tool (English)
CSS shaping formatting
JavaScript formatting tool
jsbeautifier Js Formatting Tool
php Formatting Tool (English)
HTML/JS interconversion tool
javascript pack encryption and compression tool
JS Minifier compression
JS obfuscation tool
Online JS script validator error
JavaScript regular expression online testing tool
Related article
-
How to make your JS code more readable
This article mainly introduces to the majority of JS programmers how to make themselves write JS code good-looking and easy to read, analyzes a few need to pay attention to the place and method, together to learn.2017-12-12 -
The window.open parameter is detailed with an example
Generally, we open a new window through window.open in the development process, but now the browser and antivirus have prevented this function from popping up the page, generally we will set the page to trust can be used, but we still open the page through this method in the background development process, here is a brief introduction to the use of the method and common parameters2013-06-06 -
Description of the CDATA tag in the web page
Often see such embedded tags in the html code of the web page, but the actual use has not been used, hereby recorded.2010-09-09 -
The basic features and advantages and disadvantages of constructors in JS
This article introduces the basic features and advantages and disadvantages of JS constructors, which are introduced in detail through example code. It has certain reference value for everyone's study or work, and friends who need it can refer to it2022-06-06 -
The Screen object in JavaScript
2008-01-01 -
JS Simple way to prevent bubbling events and default events from happening
This article mainly introduces JS to prevent bubbling events and default events occur in a simple way, friends in need can refer to it2014-01-01 -
javascript Math.random() Random number function
Return a specified range of random numbers (between m-n) formula, we can refer to the next.2009-11-11
Latest comments