In js, if you want to achieve the simplest copy content, you can click the button to copy the content, we will use window. clipboardData. setData (\ "Text \", \ 'contains www. bKjia. c0m \ '); below I will summarize various replication effect codes.
Today, I saw some common mouse events on a friend's website. Below I will sort out and keep a record, which will be useful in the future. If you need to know about it, you can refer to it. General eventsDescription supported by event Browser OnClick
This article recommends a good floating page advertisement to all of you. The Calling method is simple. You only need to create a div on the page and specify the id, then you can use js var ad1 = new AdMove ('gg1'); ad1.Run. The Code is as
In js, window. open () function is the most frequently used window operation. Next we will introduce various operations in js window. If you need to know about it, you can refer to it. Open a window in HTML We already know how to open a window in
In js, spaces and spaces are two different types of conditions. Spaces occupy one character space. Many programmers can directly submit a space if they enter a few spaces during judgment, to filter spaces in js, we only need to use replace for
When limiting the number input by users in js, our core code is to add the onKeyDown event in testarea, and then write a character judgment function to judge the field. value. the length is greater than the character length we set. If yes, substring
Here we will introduce the regular assignment of values to the specified div. We can use the setInterval or setTimeOut Function to execute the ajax function, so that we can refresh the function in a few seconds, let's look at the instance. Example
In js, both substring and substr are used to intercept strings. What is the specific difference between substring and substr? Is there any difference, next, I will introduce some instances to introduce these problems. Substring Method The substring
In js, we can use regular expressions to check whether the variable is a number. In addition to regular expressions, we can also use the isNaN function to check for non-numeric values. In this way, we can also obtain numbers, the following is an
This article will introduce to you more details about how to obtain the coordinate value of the clicked position in js. JQUERY obtains the coordinates of the mouse. The Code is as follows: Copy code // Obtain the mouse
The simplest way to copy content in js is to directly use createTextRange () and execCommand () and then there are window. clipboardData. setData and so on. Next I will summarize various application instances. Example 1 The Code is as
The first time I used artDialog, I didn't know some basic attributes of artDialog. I called the iframe and then called the art. dialog. close. Pop-up window method (refresh the current form when closing the pop-up window ): The Code is as
Today, I will introduce you to the principle of an array sorting sort method in js. I hope this method will be helpful to you. Recently, Baidu projects used to sort arrays. Of course, at the beginning, we naturally thought of the array sort method.