Code:
Var no = 8;
Var oTime = new Date ();
Var lastTime = oTime. getTime ();
Var x_sin, x_point, y_point;
Var x_length, x_increased, y_increased;
Var I, body_width = 932, body_height = 538;
Var lastTime = 0;
Var fallInterval = 2.4;
X_sin =
DIV blocks that can be dragged by AJAX & Lt; td width = "25%" valgin = "top" & gt; GMAIL GMAIL content cannot be displayed for the moment Sina sports anatomy of the Huawei team's unique weapon FW28 20 thousand transfer Engine Matching super
Hide the toolbar in the browser that jumps out when the mouse moves to the imageOr
Open, save as, attribute, print, and other 14 JS Code■ Enable ■
■ Save As ■
■ Attribute ■
■ Print ■
■ Page settings ■
■ Refresh ■
■ Import to
Function is used to define functions in js. Next I will introduce you to the usage of function Definition and related content such as passing values and function return values. For more information about function, see.
Functions in javascript can be
To determine whether the present value of a variable is null in js, we can directly undefined, null, \ ', false, 0, [], {} to operate the variable. Below I will show you several instances, for more information, see.
Method 1:
The Code is
After scrolling to the specified position, we will fix the effect on the left, right, or top or bottom. Next I will introduce three fixed display effects codes after scrolling to a certain position, for more information, see.
Fixed display after js
If we want to define a carriage return event, we must bind the event like jquery. We use addEventListener and attachEvent to bind the event in pure js. They do not use ie or ff browsers respectively.
For example, bind a carriage return event.
In js, parseInt and parseFloat both define or convert the numeric type, but one is an integer that supports the floating point type, that is, they have different precision.
ParseInt () function: converts a string to an integer. The return value
When it comes to webpage incompatibility in various browsers, we usually handle the problem by judging the browser and then writing different JS or CSS styles, below are some common browser judgment js:
Windows operating system browser series:
IE
Today, I encountered a problem of calculating the array summation. I always felt that the for loop summation was troublesome. I searched for the problem and thought that this method was good, but the eval here didn't know whether it was good or not.
We only need to use newclientclientdoc ument. getElementById and opener. location. reload to operate on each other. You can refer to them.
1. Pass a value from the Child Window to the parent window
If the parent page has a control id of
We can see that many websites return the top result when the scroll bar reaches the specified position. Otherwise, it will be automatically hidden, next, I will introduce the Implementation Principles and Examples of this effect.
When the visible
This is an image viewer using javascript. the next exit code is displayed at the layer. Pay attention to the functions $ (), addEvent (), and removeEvent () in the code () these functions are not encapsulated in the Image Viewer. I personally think
Old Concept
In my existing ideas, web crawlers, Spider, and Robot of search engines only capture the HTML code of pages, JS and CSS code inside or outside are ignored. Therefore, we often say that Ajax is not conducive to search engine crawling, but
Loading data from the scroll drop-down to the bottom of the page is the practice of many waterfall stream websites. Let's take a look at how jsonp is implemented. You can use the summary record of the dishes.Of course, this example uses the jquery
In the past, we only knew that ajax cross-origin can only be solved through the jsonp method. When uploading a video locally recently, we need to upload the video to Youku and youtube. If we use the post method directly, you can only see the upload
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.