Seven Practical Javascript code highlighting scripts

  Code highlightingIt is useful, especially when you need to display your own code on a website or blog, or check or debug syntax errors for others. We can supportCode highlightingSo that readers can easily read code blocks and improve the user's

JavaScript Capture web page cancel Close event

During Web development, we often use the page Close event onbeforeunload to give users a chance to stop the event, such as this blog editor. If you choose to exit, the onunload Event will naturally be triggered. But if you choose to cancel, how can

13 cool Javascript navigation menu Codes

12 super-cool Javascript navigation menu codes are collected, which are resources from foreign websites. Due to the time relationship, these menu codes are not provided for packaging and downloading, however, you can select your favorite menu based

Obtain and submit form data Asynchronously

Asynchronous submission of form data has two pain points: 1. garbled Coding In fact, the bottom layer of ajax technology is unicode encoding. garbled code occurs when GBK pages interact with interfaces. There are multiple solutions, which can

Transition event changes in YUI3.3.0

In the transition module of YUI3.2.0, other operations are performed after the transition is completed by using the transition: end event. In YUI3.3.0, this event type is no longer recommended. The following two methods are adopted: First, directly

Do you really know window. location?

If you know a little about JS Code, you will generally knowwindow.location.hrefThis attribute. Use this property to obtain the URL of the page: window.location.href = window.location.href; Okay, I tell you, it's so weak. In fact, native JavaScript

JavaScript retrieves URL parameters of the current page

LieHuo76.Net teaches 79 Cheng a very simple and common JS to get the URL code of the current webpage. In fact, this is a useful function, sometimes we do not want to use dynamic Web languages such as ASP, PHP, and JSP to intercept strings in URLs.

Js smart judgment on whether the browser is closed or refreshed

JavaScript judges whether the browser is closed or refreshed. In fact, it seems that there is no practicality, even as a reference document for Js learning. Js smart judgment on whether the browser is closed or refreshed Close or refresh the

JS implementation webpage opens the "Sort favorites" dialog box

Javascript displays "Sort favorites" on the webpage. This function has security risks, so it cannot be implemented in higher IE versions. Click the link on the webpage to display the "organize favorites" dialog box, which is similar to the "add

Improves Firefox's innerHTML () Performance

In Firefox, when the number of innerHTML operations is large, the performance will be greatly reduced. Someone wrote an alternative method to improve the performance of innhtml:Function replaceHtml (el, html ){Var oldEl = typeof el = "string "?

Enumeration of prime numbers using JavaScript

This article on cool shell is attractive: Checking regular expressions of prime numbers The Code translated into JavaScript is as follows: Copy to ClipboardReference: [www.bkjia.com] function prime (MAX ){ Var re =/^ (11 + ?) \ 1 + $ /, N, C = '1

Js Image Viewer, layer-by-layer display of the top and bottom strip

This is an image viewer using javascript. the next exit code is displayed at the layer. Pay attention to the functions $ (), addEvent (), and removeEvent () in the code () these functions are not encapsulated in the Image Viewer. I personally think

Two types of AJAX Chinese garbled Issues and Solutions

1) the parameters in the sending path are in Chinese, and the received parameter values in the server segment are garbled.For example:Var url = "a. jsp? Name = Xiao Li ";XmlHTTP. open ("post", url, true );Solution:Use the escape () or encodeURI ()

Several problems to be solved in javascript Learning

When learning javascript, we need to take a closer look at the following questions: 1. javascript callback function 2. Cross-Site Request for Cross Domain 3. Class 4. Design Mode 5. namespace 6. Various browser standards 7. Algorithms 8.

Select the JS method of the tree data node of the TreeView Control

A few days ago, in order to improve the tree-based permission selection function, jquery was used to write a method based on the tree structure. The result of this method is: "When a node is selected, the selected status of its child nodes also

Introduction and simple use of JavaScript objects

JavaScript is an Object Oriented Programming (OOP) language.JS is an object-oriented programming language (Object-Oriented ).An OOP language allows you to define your own objects and make your own variable types.The OOP language allows you to

JavaScript: Use document. createDocumentFragment to optimize performance

If the requirement for dynamic client interaction is relatively high and elements need to be added frequently and dynamically in the DOM, performance problems may occur, so DocumentFragment may be used. For more information, see the following

Obtain the image file name in Exitjs DataView.

Obtain the image file name in Exitjs DataView. 1. Front-end Copy to ClipboardReference: [www.bkjia.com] 2. Background Copy to ClipboardReference: [www.bkjia.com] protected void Page_Load (object sender, EventArgs e) { String path = Server.

Jquery Ajax operations on javascript global variables

Problem: When ASP. NET is used in combination with JQuery + Ashx to load the message system, extract the Message ID from the message data read by PAGE and then query the reply content corresponding to the message using Ajax. The Code is as

JavaScript windows. open () parameter set

[1. The most basic pop-up window Code] Copy to ClipboardReference: [www.bkjia.com] Because it is a piece of javascripts code, they should be placed between the . are used for some earlier browsers, and the code in the labels is not displayed as

Total Pages: 472 1 .... 301 302 303 304 305 .... 472 Go to: GO

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.