untitled document taoba website creation website promotion making money on the Internet free space website creation knowledge webpage effects website optimization free tutorial
1. When the number of moves on the last screen is smaller than the number to be displayed, only the difference is moved (the number of displays-the number of the last screen. For example, each screen will display 7, but the total number is only 10.
In the past, I wrote about the garbled solution of Get and post when js calls AJAX in Sina Blog, but it is complicated to use js Code, when using ajax for data interaction, we can use jQuery, a mature framework of js.For the design of a website, you
The Code is as follows:Var kingwolfofsky = {/*** Obtain the coordinates of the input cursor on the page* @ Param {HTMLElement} element of the input box* @ Return {Object} returns left and top, bottom*/GetInputPositon: function (elem ){If (document.
It is very convenient to use Jquery DataTable to process data tables. A common problem is that the page must be updated after a row is deleted. Note the following method: Pay attention when initializing the table on the front-end page:
The Code is
Check the source code. You can find that there is only one line of login code on the top.
1
However, there is only one line of flash slides.
1
For this time-consuming code, it is best to load it
The main meaning is that I have not used pre-binding, that is, when some elements in the Dom tree have not been created, it specifies some events that should be owned by elements of this type as soon as they are born. In actual development,
1. Embed php code in javascript
If javascript is contained in a js file, you can directly write php code in the js file, except that the js file contains a php extension, for example:
Ii. default values of javascript function parametersIn C, you
Javascript traverses all the images on the webpage and scales down according to the width and height of the images.The function of javascript to reduce the size of all images on a webpage is as follows:
*/
If you are not familiar with Java programming, you may want to take a look at Sun's guide. However, web page creators do not need to perform much Java development. In addition to some method calls, you should use Java code as little as possible in
Add a cache switch for $. getScript ()
The Code is as follows:
// Add cache control to getScript method(Function ($ ){$. GetScript = function (url, callback, cache ){$. Ajax ({type: 'get', url: url, success: callback, dataType: 'script',
Prototype is a method introduced in IE 4 and later versions for a certain type of objects, and it is particularly convenient: it is a method for adding methods to class objects! This may sound a little messy. Don't worry. I will explain this special
Obtain the browser page area size:Copy codeThe Code is as follows:// Available in IE, FireFox, and OperaDocument. body. clientWidthDocument. body. clientHeight// It can be obtained, which is very simple and convenient.// In the company project://
Not much nonsense. Go to the Code:Copy codeThe Code is as follows: This input can only be 0-9 This input can only be 0-9. The input event is intercepted directly when the keydown occurs, so that the input event is not allowed to be lost.You don't
Jquery dynamically loads css. js files are easy to use,
Example
Method 1:
The Code is as follows:Copy codeThe Code is as follows:$. Getscript ("test. js ");
Method 2:
The Code is as follows:Copy codeThe Code is as follows:Function loadjs (file
In many cases, we need to judge the array type of a variable. In JavaScript, how does one determine whether a variable is of the Array type? I have recently studied and shared with you, hoping to help you.Methods for detecting objects in JavaScript 1
Add the following to the setAdminTabs. js code:Copy codeThe Code is as follows:$ ("# AdminTabs li"). mouseover (function () {$ (this). addClass ("selectedTab ")}); It never works, for the following reasons:Copy codeThe Code is as follows:.
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