There is a project is to do for the chemical plant in the use of the process needs to enter a large number of data, the use of the keypad area, in the past is through Excel data entry now,
On the Web page needs to implement the function of the
I like to go to some big websites and flip through their original code, hoping to find patterns that can be applied to their own code, or to discover tools and techniques that I've never heard before. However, when I look at the source code of these
JavaScript code to read the contents of a local Excel file:
Copy Code code as follows:
Must condition:
1. The client must have the Microsoft Excel ActiveX control installed (complete with Microsoft Office installed) and be allowed
First, we look at Non-mainstream succession One: instance inheritance method.
I do not say so much nonsense, since it is Non-mainstream inheritance, it must not be used, since not commonly used still exist, there is only one factor, he used for
One of the hottest technologies in the JavaScript technology world today should be the ' event delegation '. Using event-delegation techniques allows you to avoid adding event listeners to specific nodes; Instead, event listeners are added to their
I think everyone has their own views on whether JavaScript is an object-oriented language or a language that supports objects. Those JavaScript-faithful fans must have said that JavaScript is an object-oriented language, and that JavaScript in the
The CloneNode (a) method accepts a Boolean parameter that indicates whether a deep copy
True: Performs a deep copy, copying this node and the entire child node tree.
False: Shallow copy. Only the node itself is replicated.
The copy of the node
Copy Code code as follows:
Judge various browsers and find the right way
function Launchfullscreen (Element) {
if (Element.requestfullscreen) {
Element.requestfullscreen ();
else if (Element.mozrequestfullscreen) {
Copy Code code as follows:
function foo ()
{
}
SetInterval ("foo ()", 1000);
If you use OO technology, you can do this,
Copy Code code as follows:
Constructor
function myobj
{
function foo ()
{
alert (
Framework Programming Overview
An HTML page can have one or more child frames, which are marked with to display a separate HTML page. Framework programming here includes the self-control of the framework and the mutual access between frameworks,
The company's own internal procedures, by calling the external protocol to normal use, but the external agreement must be with a client to be able to, so I would like to use JS to determine whether the client installed, if not installed, jump to the
As a front-end developer in the Web display often encounter, the title is too long, need to intercept the string, with the implementation of CSS various compatibility problems, various pits.
Let the background program, and a variety of Dodge, let
In JavaScript code, because of the differences in behavior between browsers, we often include a large number of if statements in the function to check browser features to resolve compatibility issues with different browsers. For example, our most
Copy Code code as follows:
menu2level.html
--province--
--City--
The effect is as follows:
http://img.blog.csdn.net/20140315235043343?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbGl1aGVuZ2h1aTUyMDE=/
Copy Code code as follows:
var json = {
Jarray: [],
Jpush:function (c) {
This.jArray.push (c);
}
}
var examp = ["123", "~", "456"];
Use the foreach loops given by ES5 to examp them and add them to the Jarray in JSON;
Sometimes you need to get the size of the picture, which needs to be done after the picture is loaded. There are three ways to achieve it, as described below.
First, the Load event
Copy Code code as follows:
img-load
Through the useragent to determine whether the useragent returned by the string contains "Chrome", the specific detection is done through the IndexOf method.
Copy Code code as follows:
About the IndexOf method:
The IndexOf method
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.