JavaScript script to achieve static Web page encryption, reading JavaScript script to achieve static Web page encryption, two days ago to see someone ask static Web page encryption problem, wrote this code thinking: encryption: First of all, the
Copy Code code as follows:
Amount Format Conversion
function Parseprice (s) {
var n = 2//Set number of decimal places reserved
s = parsefloat ((s + ""). Replace (/[^\d\.-]/g, "")). ToFixed (n) + "";
var L = s.split (".") [0].split ("").
main features of metro style design
1.Windows 8 Metro style design to enable navigation of website or system functions
2. Pure JavaScript implementation
3. Support all IE, 360, chrome and other popular browsers
4. Support for corners, shadows,
In ES3, delete is introduced in 8.6.2.5 and 11.4.1, as follows
Some information,
1, implementation of the delete operator will call the engine internal [[Delete]] Method
2. [[[Delete]] defined in 8.6.2
3, the deleted property has a
JavaScript parentheses have five kinds of semantics
Semantic 1, Function declaration time parameter table
Copy Code code as follows:
function func (ARG1,ARG2) {
// ...
}
Semantic 2, used in conjunction with some
1, traversing all the controls in the facefunction Findcontrolall (){var inputs=document.getelementsbytagname ("input");for (j=0;jif (inputs[j].type== "text")//here, find all controls with text of the page, or you can set the type of control you
In the process of making a Web page, you sometimes need to know exactly where an element is on the page.
The following tutorial summarizes the knowledge of JavaScript in Web site positioning.
One, the size of the Web page and the size of the
The JavaScript alert () function is a function for entering hints, but today when using alert () prompts Chinese garbled, pinyin, what is no problem ah, I found a solution in the forum, below to share with you.
Solution One:
Copy Code code as
JavaScript implementation of a set time validity, the sense of the implementation of their own jquery code is too concise, this is a colleague to write a section of JS code, their own research to learn a bit
Copy Code code as follows:
Because many mobile terminals do not support Flash, many colorful flash effects do not come out. If you can determine the type of access to a Web page (PC or mobile terminal). Can be the right remedy, find the solution!
The type of access is mobile
window.open () Support environment: javascript1.0+/jscript1.0+/nav2+/ie3+/opera3+
window.open (Pageurl,name,parameters)
Pageurl as a child window path
Name pop-up window
Parameters for window parameters (comma-separated arguments)
alwayslowered |
First, local variables are declared after use and do not affect external variables with the same name
Copy Code code as follows:
var x = 1; --> external variable X
function fn () {
alert (x); --> undefined local variable x first
In a recent project, you will not be able to debug JavaScript code when submitting to a child page, sometimes this problem, we can not normal in the browser, see our child page JavaScript code, so can only use the original alert or Console.log (),
A colleague posted a post on the company's OA, describing how to get the length of the mixed string in the JavaScript language.The regular expression is used.
Copy Code code as follows:
var str = "tank is Tank";
var len = str.match (
The intersection of multiple arrays needs to be achieved in the project, so this example applies only to specific scenarios. For example, a array of var a = {1000,10001,10002,10003}; b array var b = {10002, 10003}; C array var c = {10003}; You need
Some time ago to work with JSON data, I hope that some simple additions and deletions to the client to do, this can also reduce the pressure on the server side. Looked up several JavaScript libraries that could operate on JSON, and eventually Taffy
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service