1. Using jquery to use HTML5 's Formdata attribute to implement file upload
In HTML5 before we need to implement file upload server functions, sometimes we have to rely on flash to achieve, and in the arrival of HTML5, we are very easy to upload
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 * *
Marquee
Imitate IE below the marquee effect, the mouse moves up pauses. The main principle of forming a ring is that each picture once determines the outer display window to be added to the tail, using append and prepend to simulate the push () and
Http://r.qzone.qq.com/cgi-bin/user/cgi_personal_card?uin= Specify QQ number
The following items will be returned:
_callback ({"UIn": Query QQ number,"Qzone": 1,"Nickname": "nickname","Offsetbirth": The number of days from birthdays,"Avatarurl":
js block bubbling
In the process of blocking bubbles, the different methods used by the consortium and IE, then we have to do the following compatibility.
Copy Code code as follows:
function Stoppro (evt) {
var e = evt | |
(1): First with JS to write real-time display system time function Clockon () only a parameter bgclock, used to specify the display for the conversion of the name of the tag, no return value, you can change the function of Web site development in
Get the elements in the page to the document area. Two methods for horizontal and vertical coordinates of documents and their comparison
JS control elements in the process of movement, for the page element coordinates position acquisition is often
Garbled, garbled, head big, annoying, say set Tomcat can be resolved, but sometimes regardless of the use, at this time, we can consider the way of transcoding not directly to the Chinese, in JS with escape transcoding, remember the need to use two
The following is an online-picked article (not tested but canonical to imitate)
Copy Code code as follows:
text
A;
two;
three;
four;
five;
The following is a value that does not choose to get radio
Summary:
Now there is a requirement as shown in the figure, when the user check the display clear text checkbox, in clear text to display the user input password, remove the check to change back to the ciphertext, just begin to think of is to
Because the project needs to select the printed content in one page.
Pick up what you want to print with a div layer. For example:
Copy Code code as follows:
(Notification number: ${zjxfitemuser.acceptedno})
Petition matters
1. Use picture width display position to play picture, technology:. offsetwidth, Abtn[i].index = i, SetInterval (), Oul[0].style.left =, onclick ()2, using the array into the picture by the row carousel, Technology: SetInterval (). No onclick ()
When you do a company project, you need to write a method whose parameters are a menu array set and a menu ID, and the menu array is in the form of a tree json, as shown here:
Copy Code code as follows:
[{"id": "Text": "Company
Copy Code code as follows:
function Obj2str (obj) {
Switch (typeof (obj)) {
Case ' object ':
var ret = [];
if (obj instanceof Array) {
for (var i = 0, len = obj.length i Ret.push (Obj2str (obj[i));
}
Return ' [' + ret.join (', '] + '] ';
Sometimes we need to save the user name with a cookie, record the login status, and how to correctly determine if the user cookie exists? You can't simply use the a!= ".
Copy Code code as follows:
A=getcookie ("Username3");
JS how to determine if Flash is finished loading it?
How do we recall a JS function we set when the Flash is loaded?
This question, has been bothering me for a long time, until today, consulted a very cow B character, suddenly came to feel!
Oh,
Jspdf doesn't seem to support Chinese
Copy Code code as follows:
Downloadify
it seem do not support to chinese
you must have Flash installed to download this file.
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 example of this paper describes the method of JS to implement the cross page call function of the IFRAME. Share to everyone for your reference. The implementation methods are as follows:
The problem with the project is that the page introduces
The example in this article describes the substitution or modification function replacechild () Usage of a DOM node. Share to everyone for your reference. The specific analysis is as follows:
The replacement process for DOM nodes:(1) Create a new
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