The example in this article describes a selector instance of the jquery implementation that does not contain the current item. Share to everyone for your reference. Specifically as follows:
This code shows jquery Select all the links, click on one
Copy Code code as follows:
function Getmonths (dateday) {
/* Get the month of the current date * *
var curdate = new Date (dateday);
Return Curdate.getmonth () +1;
};
function Getyears (dateday) {
/* Get the year of the current date * *
Copy Code code as follows:
Get the current URL, such as: http://localhost:8080/Tmall/index.jsp
var curwwwpath=window.document.location.href;
Get the directory after the host address, such as:/tmall/index.jsp
var
Copy Code code as follows:
function Validatenum (obj) {
Positive integer (cache used here)
var number = Obj.data (validate). number;
Decimal point (cache used here)
var decimal = obj.data (validate). Decimal;
Dynamic Basic Validation
Disable the right-click menu of the Web page, but you can still use shortcut keys to copy.
JS code disables the replication feature:
Copy Code code as follows:
Note that this code must be placed behind the body element, in
1.javascript How to refresh the pageWindow.location.reload ();Use window.open () pop-up pop-up window to refresh the parent windowWindow.opener.location.reload ()
Using the Window.showdialog pop-up mode windowWindow.dialogArguments.location.reload (
Before you mention the above concepts, first of all, let's talk about the implied parameters of functions in javascript:
Arguments
Arguments the object represents the function being executed and the arguments of the function that called it.
various actions related to jquery for Drop-down lists, text boxes, check boxes, and Radio boxes. The best way to record and collect. Traversing option and adding, removing optionfunction Changeshipmethod (shipping) {var len = $ ("select[@name
ShowModalDialog: modal window, a very special kind of window, when it opens, the activity of the parent window will stop, unless the current Mode child window is closed to manipulate the parent window. When doing web Ajax development, we should
In the front-end development process, we often encounter problems with adding events to page elements, add the event of the JS method is also a lot of directly added to the page structure, there is a use of some JS event monitoring method, due to
The first method:
The second method:
id=
The following is a description of the JS method used in the example:
1, join (): This method is used to put all the elements in the array into a string. The elements are
Heard is the most commonly used .... I was looking at the art of DOM programming.
Untitled document SSS
Sometimes there are multiple DOM classes that are the same and can be handled like this:
Copy Code code as
As shown in the figure:
You can return a directory path.
The operation is as follows:
function Browsefolder () {
try{
var message = "Please select folder";//selection box hint info
var Shell = new ActiveXObject (" Shell.Application ");
One, Date objectEvery day an object, today to see the Date object, relative to time everyone must be very familiar with, should be in the site before many places will encounter such a time effect. Let's take a moment to recall the date object today.
Two methods are supported in the JS Array, Shift () and pop (), which is to delete a value from the front and back of a data, and to delete the value. Look at an example and you'll see:
Copy Code code as follows:
var arr = [' s ', ' o
Oschina, that's mine too, now put it here, haha
This piece of code can only upload one file at a time ~ ~
Copy Code code as follows:
var path=require ("path");
var fs=require ("FS");
var http=require ("http");
Post Value payload
The previous shortest IE decision by the use of IE does not support the characteristics of vertical tabs out.
Copy Code code as follows:
var ie =!+ "\v1";
Just need 7bytes! See this article, "bytes, EHR ..." 9, EHR ... 7!!!
HTML tag code in asp.net:
Copy Code code as follows:
Plain HTML Tags:
Copy Code code as follows:
For asp.net or plain HTML tags, the following JS code applies:
Copy Code code as follows:
TextArea is called a text field, also known as a text area, a multiline text input control with a scroll bar that is often used in a Web page submission form. Unlike a single-line text box, the text control does not limit the number of words by the
1. Display Date Code:
JS Code
/* Get current date/function GetCurrentDateTime () {var d = new Date ();
var year = D.getfullyear ();
var month = D.getmonth () + 1;
var date = D.getdate ();
var week = D.getday ();
/* Time seconds * */*var
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