JS get the value of the dropdown box and text online provides 2 methods: But some people are very irresponsible, they did not consider the differences between the browser caused by the error, resulting in a lot of novice thinking about a half-day
Method One:
When doing a project, you may encounter the need to verify form input correctness with JS, this time you need to use the regular expression of JS. For example: To verify the month, the format is: ' yyyy-mm ', this regular expression is
Today to write a div+css analog JS information box class Library encountered a problem, I hope that when I did not pass the parameters of the past, automatically use the "prompt information" as the window title. I tried to write this.
Copy Code
The following is a millet snapped up the JS code, analysis can be used to achieve a red rice snapping software, everyone according to the code to achieve their desired function!
Copy Code code as follows:
Hdcontrol ({"Stime": 1381645
After the manned page, the browser output stream closes automatically, and after that, any document.write () method that operates on the current page opens-a new output stream. It clears the contents of the current page, including any variables or
Copy Code code as follows:
/*
Cookie Tool
How to use:
Stored value
var value = "7 Days";
Tools.cookie ("Day", value, {expires:7}); To save a string: "7 days" to a cookie for 5 days with the key "Day"
Take value
var v = tools.cookie
Copy Code code as follows:
The HTML page should have an input input box with ID Identity_card, a ipmessage ID error or the correct prompt message where
When using Html+css+javascrpt for page making, we often encounter some small details that affect the user experience and are easily overlooked by us. For example, the input box of the message, how to get and lose focus on the object to achieve its
There are generally two ways to parse a JSON string into a JSON data format in JS:
1. One is to use the Eval_r () function.
2. Use function objects to perform return parsing.
In the data transfer process, JSON is passed in the form of text, a
4 ways to define functions for JS function1. The most basic function declared as a Benbon is used.Copy code code as follows:
Copy Code code as follows:
function func () {}
Or
var func=function () {};
2. Use as a class
Copy Code code as follows:
function Square (num) {
var total = num*num;//local variable
return total;
}
var total = 50;//global variable
var number = square (20);
Alert (total);//The result is 50
function Square (num)
QQ Interconnect JS sdk:http://wiki.connect.qq.com/js_sdk%e4%bd%bf%e7%94%a8%e8%af%b4%e6%98%8e
Copy Code code as follows:
Add the following information to the body:
Set QQ Share button
Qc. Login (
{
Btnid: The node ID of the
For example, give a specific alphabetical order, "a", "O", "E", "U", "Y", "I", please sort the 7 strings of ' Aiye ', ' oeu ', ' ayo ', ' Eoyiu ', ' yuo ', ' You ', ' Iao ' in the given alphabetical order.
My idea is to give those 6 letters
Use meta tag "viewport"
The viewport tag contains the following properties:
In order to automatically detect and fit to the screen width, you should use Device-with instead of setting a fixed value, in addition to avoid user scaling resulting
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