JavaScript is a weakly typed language, declaring a variable without declaring its type, and Var x can be equal to any type of value.
Like what:
var str = "string ...";
var arr = [' This ', ' is ', ' array '];
var obj = {name: "Caizhongqi",
Directory:
1: Pseudo Object2: Converting to String3: Digital Spin string4: Convert to Number5: Convert to BooleanThe difference between 6:number () and parseint ()The difference between 7:string () and ToString ()
1: Pseudo Object
Pseudo object:
The first thing to do is to have JavaScript basics before you can read this article.
(1) JS calls the Android method:
Copy Code code as follows:
WebView Wview;
Wview. Addjavascriptinterface (Object obj, String InterfaceName);
is
When we want to achieve rich graphics and text mixing effect, we usually use WebView, this is a very powerful control, to see the official explanation:
Copy Code code as follows:
A View that displays Web pages. This class is the
Error Object
Property:
Name: Wrong name
Number: Error
Description: Description
Message: Error messages, multiple description
FF only Property
FileName: The file where the error occurred
Stack: Call stack when an error occurs
Constructor:
Error ()
Did you know that JavaScript is actually a functional programming language? This guide will teach you how to use the functional features of JavaScript.
Requirements: You should have a basic understanding of JavaScript and DOM.
The purpose of
Recently, there is a need to export the data to Word, and then edit the print.Thought about several scenarios:1. Use Jacob.2. Use Apache poi.3. Use Itext.Because time is tight, there is not much time to study the above toolkit, now use JavaScript to
Prototypes and closures are the most common in JavaScript, the most difficult to understand, the most easily as the problem of the two parts, of course, and their extension, such as the scope chain, inheritance, and so on, I recently also a variety
Objective
We often encounter the problem of date and time in the front-end JavaScript development, and usually get a lot of processing functions to complete a simple date and time display effect. In order to improve the speed of the development of
Front.
The parameters of a JavaScript function differ from those of the functions in most other languages. The function does not mind passing in the number of arguments, nor does it care what data type the incoming parameter is, or even the
Copy Code code as follows:
/**
* Get Chinese and English characters
* @param {} str
* @return {}
*/
function LENGTHB (str) {
var p1 = new RegExp ('%u ... ', ' g ')
var P2 = new RegExp ('%. ', ' G ')
return Escape (str). replace (P1, ').
Front.
Most of the time, the main reason for our confusion about the scope is that it is not clear whether the variable should be found in the nesting order of the function, or in the order in which the function is called. Plus the interference of
Split definition and usage
The split () method is used to split a string into an array of strings.
Grammar
Stringobject.split (separator, howmany) parameter description
Separator required. A string or regular expression that splits the Stringobject
1. What is a cookie? A: Cookies are used to store session information on the client. part of the 2.cookie?① Name: A name that uniquely determines the cookie. It is recommended that the case be case-sensitive. The name of the cookie must be URL-coded.
Registering events in the oldest JavaScript browser can only be done in inline mode. Since DHTML fundamentally changed the way you manipulate pages, the registration of events must be extensible and adaptable. Therefore, there must be a
No event, no script. Take a look at any Web page with JavaScript code: Almost every example has an event that triggers the script. The reason is very simple. JavaScript is adding internal activity to your page: the user does something and then the
Usually, the default value of the Parameter object is given in the function, at which time it is necessary to overwrite the parameters passed into the default parameters by extend, such as:
Code:
Copy Code code as follows:
After some design, finally completed this function. After the introduction of this JS, you can configure the format string to output various custom date formats.
Flow chart
As you can see, a format string is actually a string containing a specific
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