Javascript is often used recently, and many web page effects are made, including a folding menu.
OnlineCodeA lot of trouble, and I don't understand it, so I don't understand it. Why do I write so much code ~~~~ So I wrote it myself.
Mainly used
I suddenly used the javascrip two-dimensional array in the project. I checked and found that javascrip has no two-dimensional array. if you don't have one, you have to use other methods to implement similar functions. the first method is to use a
Explanation of the sort () function in the array: The following arrayobj. Sort (sortfunction) sortfunction parameter is the name of the function used to determine the element order.
If this parameter is omitted, the elements are listed in ascending
1. Access the elements in the documentDocument. getelementbyid ('id'): gets the element of the given ID and uses it as an object.Document. getelementbytagname ('tagname'): obtains all elements whose tags are named tagnames and stores them in a list
JS Regular Expression
// Check whether it is composed of digitsCode
1. Function isdigit (s)2 .{3. var patrn =/^ [0-9] {1, 20} $ /;4. If (! Patrn.exe C (s) return false5. Return true6 .}
// Check Logon Name: You can enter only 5-20 strings starting
The following example integrates autoit to monitor and process the Javascript pop-up window in a separate thread:
Require 'watir'
# Require 'win32ole' # already supported ded if you use 'require watir'
#
# Function to look for popups
Def check_for_
1. Create a script block
1:
2. Hide the script code
1:
Related code will not be executed in browsers that do not support JavaScript.
3 display when the browser does not support
1: 2: Hello to the non-JavaScript browser.3:
4. Link an external
Aptana
Search for the integrated development environment developed in Java and similar to eclipse, which is good to use. It can be used with Firefox and firebug for debugging.
It feels good.
The following is the simple code:
untitled document
1: attachment parameter G usage
After the expression is added with the parameter G, it indicates that global matching can be performed. Note the meaning of "yes" here. Details:
1) if G is not added to the exec method of the expression object, only
Entity-type city
Public class city {Private integer cityid;Private string cityname;Private integer provinceid;Public City (){Super ();}Public City (string cityname, integer provinceid ){Super ();This. cityname = cityname;This. provinceid =
1. for the JSON string returned by the server, if the jquery asynchronous request does not provide a type description or is accepted as a string, an object processing is required. The method is not too troublesome, but the string is placed in eval ()
In the Web
On the page, we often see several associated drop-down menu selection boxes. When a visitor selects an option in the first drop-down box, the content in the second drop-down box changes accordingly. For
For Web developers, this often
1. File description
TPL. xml: form field and content data file, which references TPL. XSL
TPL. XSLT: Form Field Rendering Control script, reference TPL. js
TPL. JS: form field rendering Auxiliary Control Specimen
Tpl.html: client HTML page.
2.
function foo(){ foo.abc=function(){alert(1)} this.abc=function(){alert(2)} abc=function(){alert(3)} var abc=function(){alert(4)}}foo.prototype.abc=function(){alert(5)};foo.abc=function(){alert(6)}var obj=new
We sometimes need to clear the values in the options set in the select control,I found it online, most of which areOBJ = Document. getelementbyid ("DRP"); // DRP is the ID value of the select control.For (I = 0; I OBJ. Options [I] = NULL;
However,
In win7
myhtml.html --> ----- begin certificate ----- miicqtccaaq ** certificate content **/wpuhbs8 = ----- end certificate ----- the browser does not support JavaScript or your security settings do not allow JavaScript to run.
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