Create a text node using js document. createTextNode ()

In js, if you want to create an element node, we usually use createElement, but to create a text node, we can use createTextNode () or createComment () for an instance. I will introduce it in detail below. In Javascript, you can create various types

Code for determining whether the value/variable is null using Javascipt

To determine whether the present value of a variable is null in js, we can directly undefined, null, \ ', false, 0, [], {} to operate the variable. Below I will show you several instances, for more information, see. Method 1: The Code is

Fixed display after js/jq is rolled to a certain position

After scrolling to the specified position, we will fix the effect on the left, right, or top or bottom. Next I will introduce three fixed display effects codes after scrolling to a certain position, for more information, see. Fixed display after js

Clear, define, and delete javascript Array Operations

Js arrays have various operations. Next I will introduce how to clear, define, and delete js arrays, and also introduce array sorting. You are welcome to refer to them. Let's take a look at how to clear the js array. When an array needs to be

Javascript defines the carriage return event (addEventListener/attachEvent)

If we want to define a carriage return event, we must bind the event like jquery. We use addEventListener and attachEvent to bind the event in pure js. They do not use ie or ff browsers respectively. For example, bind a carriage return event.

Introduction to XMLHttpRequest and $. ajax

There are two common methods to use ajax in js: the original XMLHttpRequest method and the popular Jquery ajax method. I will introduce them here. For Ajax, the core object is XMLHttpRequest. All Ajax operations cannot be separated from operations

Introduction to the original js ajax creation method (XMLHttpRequest)

Before jquery appeared, we had to use XMLHttpRequest to Create ajax before creating ajax. Next I will take out the ajax I wrote many years ago. XMLHttpRequest The Code is as follows: Copy code Next let's take a look

Summary of several examples of page stay time displayed in javascript

Sometimes we can see that some websites can record the access time when you enter the website and leave the website. Below I will use js to write a few simple methods, for your reference. Instance 1 The Code is as follows: Copy code

Code for redirecting javascript code to the position of a specified Element

This article will introduce you to the program for redirecting to the specified element. This is a good transfer program. If you need to know about it, you will not be able to access it. The Code is as follows: Copy code /***

Js iframe framework page Jump (jumping out of the parent Framework)

When developing a website in the background, we often need to click exit or timeout to automatically jump out of our current framework page. We can solve this by using many methods, next I will introduce some methods for jumping out of the framework.

Close current page/close current window in js (compatible with all browsers)

In js, the window or page cannot be judged. close () function, but if you want to be compatible with all browsers to close the current window, you do not directly use window. close. Windows built-in Methods Window. close () The Code is as

Differences between window. navigate and window. location. href

Window. navigate only supports ie browsers, while window. location. href is compatible with all browsers, so I do not know why window. navigate appears. Here I will introduce it to you. The first note is that window. navigate and window. location.

JS judges the browser type to handle browser compatibility

When it comes to webpage incompatibility in various browsers, we usually handle the problem by judging the browser and then writing different JS or CSS styles, below are some common browser judgment js: Windows operating system browser series: IE

Jquery-verified email verification instance

In jq, email verification is the same as in javascript. We use regular expressions such as/^ \ w + ([\.-]? \ W +) * @ \ w + ([\.-]? \ W +) * (\. \ w {2, 3}) + $/. test (txt_value) is difficult. There is no difference between the method and js. Some

Js users press the keyboard to display the keyCode instance

This article introduces a js user who presses the keyboard to display the keyCode instance. For more information, see. Js instance The Code is as follows: Copy code press the keyboard to display the keyCode the keyCode you

Usage of Javascript string objects

This article will introduce the usage of string objects in detail. If you need to know about js string objects, you will not be able to refer to them. The Code is as follows: Copy code Var a = "abcDEfGgdefg32asdf38 ";Document.

Detailed description of JS subwindow operation parent window instance

We only need to use newclientclientdoc ument. getElementById and opener. location. reload to operate on each other. You can refer to them. 1. Pass a value from the Child Window to the parent window If the parent page has a control id of

Summary of JS methods for creating and storing cookies

In js, cookie operations are related to the storage and clearing time. We only need to set the cookie expiration time to control its storage, below I will summarize some tips for using cookies in js. Create and store cookies In this example, we will

Implementation example of the javascript Inheritance Mechanism

I have been hard to understand the Inheritance Mechanism of Javascript language. It does not have the concept of \ "subclass \" or \ "parent class \", nor does it have the concept of \ "class \" (class) and \ "instance \" (instance), all rely on a

Solutions for session/cookie invalidation of iframe cross-origin calls in IE

The reason for the invalid session and cookie for iframe cross-origin logon in IE browser is that the P3P (Platform for Privacy Preferences Project (P3P) specification supported by IE6/IE7) by default, the Protocol prevents third parties from having

Total Pages: 473 1 .... 437 438 439 440 441 .... 473 Go to: GO

Alibaba Cloud 10 Year Anniversary

With You, We are Shaping a Digital World, 2009-2019

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

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.