Using JScript to compile Visual HTML content editing is actually old. Without this, many blog websites will be eclipsed. But there are actually many features that we don't know about:When editing HTML, the configuration controller is generally iframe(id_iframe1). you only need to pass iframe1.doc ument. designMode = "on"; to bring it into the design mode.2. To enable the multi-choice, 2D location, and instant resizing functions, You can execute:Iframe
Idea: Call the object through the new activexobject () method in JScript
// Demo 1 reads data
Function readfromdb (){VaR S = "";// Create a database objectVaR objdbconn = new activexobject ("ADODB. Connection ");// DSN string// Var strdsn = "driver = {SQL Server}; server = 127.0.0.1; database = study; uid = sa; Pwd ="; // SQL server connection method// Var strdsn = "provider = Microsoft. Ace. oledb.12.0; Data Source = c: \ database1.accdb; persi
CScript Error: Unable to find script "... Installwizardforvs2010.js script Engine "JScript".
C code
------Solution--------------------------------------------------------
Maybe your script library is being reversed, try:
Cmd
CD/D C:windowssystem32
regsvr32 jscript.dll
regsvr32 vbscript.dll
This should allow you to execute the script.
Install COCOS2DX vs template times error on Windows 7 64bit system. The above is the workaround.
Some say it
JScript calls ActiveXObject get the guest's Nic MAC address, note that only IE run (ie8+ not tested), there will be security prompts, prompted as follows:
Copy Code code as follows:
The interaction between the ActiveX controls on this page and the rest of the page may not be secure. Do you want to allow this interaction?
Note Select Yes, or you cannot get an error:
The source code is as follows:
JScript is a case-sensitive language.The first character must be an ASCII letter (either uppercase or lowercase), or an underscore (_). Note that the first character cannot be a number.Subsequent characters must be letters, numbers, or underscores.The variable name must not be a reserved word.Some examples of the names of legal variables are given below:_pagecount Part9 Number_items Here are some examples of invalid variable names:99Balloons//cannot b
Microsoft's interpretation of conditional compilation is:
Some typical uses of conditional compilation include using new features in Jscript, embedding debugging support in scripts, and tracking code running.
First look at a piece of code simple to understand:
var s=0//@cc_on +1
Alert (s)
If you are using IE you can see that the browser pop-up tip s is the value of "1";
var s=0//@cc_on +1
In IE is equivalent to:
var s=0+1
Conditional c
There is a enumerator object under JScript that can traverse the collection. The following program is written according to its documentation to traverse the entire Request.QueryString collection:The code is as follows:
var params = new Enumerator (request.querystring);
while (!params.atend ()) {
Response.Write (Params.item () + ":" + request.querystring (Params.item ()) + "Params.movenext ();
}
In the ointment, the request object itself is not a colle
Author: Weeping Red Pavilion
In the last article, "event-driven programming," I talked about three ways to bind events to elements, and the third approach is to use Attachevent/addeventlistener to bind. The gist of the last article is to tell you how to use events, The gist of this article is to let everyone know how to use events flexibly to batch a class of object behavior.
First, let's talk about the concept of event delivery. What is an event pass? As a practical
Use constructors to create objectsA constructor is a function that calls it to demonstrate and initialize special types of objects. You can use the new keyword to call a constructor. The following is a new example of using constructors.
VaR myobject = new object (); // create a common object without attributes.VaR mybirthday = new date (1961, 5, 10); // create a date object.VaR mycar = new car (); // create a user-defined object and initialize its a
1. templates can be used for data types, such as C ++, which is relatively simple, but C is difficult.
2. If there is no data type, it is necessary to judge all points for execution. Time is complex and time is not optimized, and the code is easy to understand. For example, test the right triangle.
VaR Epsilon = 0.00000000001; // small numbers to be tested.
Description
Encode string objects so that they can be read on all computers,
SyntaxEscape (charstring)The charstring parameter is a string object to be encoded.
Description
Escape returns a New String object (in unicode format) containing charstring content. All spaces, punctuation marks, accents, and other non-ASCII characters are replaced by 1 encoding, XX indicates the hexadecimal number of the character. For example, a space returns "".If th
variables
Other resources
Conditional compilation
@cc_on condition Compilation of IE
1:alert ("browser version:" +ssuffix)
Used to determine the browser's version is very useful
var b =/* @cc_on!@*/false; where/* @cc_on ... @*/
The parts can be identified by IE and executed as a program, enabling IE conditional compilation. The most commonly used variable is the @_jscript_version:js version, the last one is the IE major version number
Example:
Example of regular expressions
An expression
Match
/^\s*$/
Matches a blank line.
/\d{2}-\d{5}/
Verify the ID number consisting of two digits, one hyphen, and 5 digit digits.
/
Matches HTML tags.
The following table contains a complete list of metacharacters and their behavior in the cont
Character
Description
\
Mark the next character as a special character or text. For example, "N"Match the character "N. "\ N"Match the line feed character. Sequence "\" and "\"And "\ (" matches.
^
Matches the start of the input.
$
Matches the end of the input.
*
Match the first character Zero or multiple times. For example, "zo *"Match with "Z" or "Zoo.
: If the need to introduce external JS need to refresh to perform]
A very simple example, the page has only one button, its value is "This is a button", and we give it the onclick attribute, its value is a row of JavaScript code, using the Window object's Alert method, Displays the contents of the This.value in the warning form. This is the object of the current operation, that is, the input object. This code tells the browser: "The current object
a file, use the CreateObject method. The GetObject method is available for all COM classes, regardless of the language used to create the object. If you supply the Strprefix parameter, WSH will connect the output interface of the object to the script file after the object is created. When an object raises an event, WSH calls the subroutine that attaches the strprefix at the beginning of the event name. For example, if Strprefix is Myobj_ and the obje
To create your own object instance, you must first define a constructor for it. The constructor creates a new object, assigns attributes to the object, and assigns methods when appropriate. For example, the following example defines the constructor for the pasta object. Note This
Keyword, which points to the current object.
// Pasta is a constructor with four parameters.Function pasta (grain, width, sha
Single-state Definition:The Singleton mode ensures that only one instance of a class exists in a Java application.
In many operations, such as creating a directory database connection, such single-threaded operations are required.
In addition, Singleton can be stateful. In this way, multiple single-State classes can serve as a status warehouse together. For example, if you want a Post Counter in the Forum, you need to count every time you browse. Can
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.