This article mainly introduces the summary of common tips for JavaScript. For more information, see the preface.
I would like to summarize the JavaScript syntax sugar recently introduced and share it with you.
There are detailed descriptions and examples for each piece of sugar, so I will not go into more details.
Accurate type check
The Code is as follows:
/** @ Function:* Type check example* This method can be used to check whether a variable is
also be broken when an expected Ajax request is created.This is an amazing tool for debugging the network of your web application.
4. simulate different mobile devices
Chrome has a built-in mobile device simulation tool that simplifies your daily work.Select any non-Console tab to find them, press the esc key on the disk, and select the mobile device you want to touch.
Of course you won't get a real iPhone, but the size, touch events, and agemts will follow suit for you.
5. Upgrade your site th
This article mainly introduces 55 typical tips in Javascript. For more information, see oncontextmenu = "window. event. returnValue = false ".
No
Available for Table
2.Cancel selection and prevent Replication
3. onpaste = "return false" Do not paste
4. oncopy = "return false;" oncut = "return false;" Prevent Replication
5.
Replace the IE icon in front of the address bar
6.
Show your icons in favorites
7.Disable Input Method
8. Always
that the $ (). each method can be used below 1000. If this number continues to increase, the for loop statement should be used.Minimize DOM operationsDOM operations are relatively expensive on the page (for example, inserting or deleting a piece of text on the page). Minimizing this change is the best practice to maintain performance! For example:Copy codeThe Code is as follows: We can see that the first example modifies the DOM 100 times, while the second example only modifies the DOM once. Th
In the actual project, we can change the data acquisition into AJAX dynamic acquisition, in GetContent ()
The above is a small set to introduce the JS imitation Baidu automatic drop-down box fuzzy matching tips, I hope to help you, if you have any questions welcome to my message, small series will promptly reply to everyone!
browser.
2) Dragonfly
The source code view has syntax highlighting and you can set breakpoints. Powerful search function that supports regular expressions.
3) Getfirebug
You can edit, debug, and monitor CSS, HTML, and JavaScript in real time on any Web page.
4) Debugbar
5) Venkman
Venkman is Mozilla's JavaScript debugger name. It is designed to provide a powerful JavaScript debugging environment for Mozilla based browsers (Firefox, Netscape 7.x/9.x and SeaMonkey).
The above i
work together.
>> Object-oriented design functions to make it easier for you to maintain
>> built-in functions do a lot of work, you don't need to write it over and over again
>> development of large applications is necessary
>> Many suggestions, tips and hack have been implemented by the framework
36. Often look at PhpbenchPhpbench provides benchmark results for basic PHP operations that show how some of the small variations of the
!
business Scene three , similar to scene two, need to upload multiple files, but multiple files may be uploaded separately. That we may have uploaded 10M for the first time, the second upload of 10M, a total of 10 uploaded, then, on the server side, a one-time submission must be exceeded the size of the upload limit, but if we are the upload every time, this is possible, and the final submission, We just need to pass the short text message up!
The idea is really simple, it seems, is no proble
Copy Code code as follows:
/**
* Function: The code in the JS file to achieve the [input automatic search tips] function, such as Baidu, Google search box to enter some characters will be the following Drop-down list form gives some hints, improve the user experience
* Use instructions: see Suggestions.txt file
* Author:sunfei (Sun Fei) date:2013.08.21
*/
var sugobj = new Object ();
$ (document). Ready (function () {
Get the Input Box
Article Introduction: 22 CSS Tips that must be known.
1, change the background and color of selected text
:: selection{/* Safari and Opera *
Background: #c3effd;
Color: #000;
}
::-moz-selection{/* Firefox *
Background: #c3effd;
Color: #000;
}
2, to prevent the red fox roll Jump
html{Overflow-y:scroll;}
3, Paging printing
. page-break{Page-break-before:always;}
4. Use!important
Word Practical tips problem solving (practical)
Q: How do I set a different header for each page in Word? How do I make different sections show different headers?
A: section, each section can be set up a different header. Files--page Setup--layout--header and footer--Different home page
Q: How does Word make each chapter use a different header? How can I only use a header now, change it all?
A: In the Insert separator, select the insertion section bre
builder using a table generator
Do you hate Excel? Don't worry, I am too. If you want to save yourself the HTML form time of generating simple structure, there are thousands of form generators available online. Please note that I am talking about "simple structure". Don't think you need to do anything with these generators.
Here are a few simple free form generators:
QuackitTable GeneratorKotatsuSpectrum
A small style has gone a long way a Little styling Goes a long Way
Now that you have a
10 PHP skills that are very useful for beginners and for beginners. 10 Useful PHP skills for beginners. This article describes some tips and skills for improving and optimizing php code for your reference. the specific content is as follows: 1. do not use 10 PHP skills that are useful to beginners.
This article introduces some tips and tips for improving and opt
Lync Tips-1-Troubleshoot ways to search for contactshttp://dynamic.blog.51cto.com/711418/1219759Lync Tips-2-fix every time the installation progress bar appearshttp://dynamic.blog.51cto.com/711418/1219763Lync Tips-Publish certificate revocation Listhttp://dynamic.blog.51cto.com/711418/1219765Lync Tips-I should use dyna
This kit (fortunes-debian-hints) provides a bunch of tips for debian Linux, which are very practical. note: These Tips also apply to UbuntuLinux. install apt-getinstallfortunes-debian-hints # thanks to the translation of Chihchun. the Orz kit is used by Shell. every time fortune is executed, a small value is displayed.
This kit (fortunes-debian-hints) provides a bunch of
PHP code optimization tips and php tips. PHP code optimization tips summary, php tips summary PHP optimization aims to get the fastest running speed and the most easily maintained code at the lowest cost. The following optimization tips are provided: PHP code optimization
12 very useful JavaScript tips [recommended] and javascript tips
This article will share with you 12 tips on JavaScript. These tips may help you solve some problems in your actual work.
Use !! Operator to convert boolean values
Sometimes we need to check whether a variable exists or whether the value has a valid value.
12 very useful JavaScript tips and javascript tips
In this article, I will share with you 12 tips on JavaScript. These tips may help you solve some problems in your actual work.Use
!!Operator to convert boolean values
Sometimes we need to check whether a variable exists or whether the value has a valid value.trueValue.
Share 12 very useful JavaScript tips and javascript tips
In this article, I will share with you 12 tips on JavaScript. These tips may help you solve some problems in your actual work.
Use !! Operator to convert boolean values
Sometimes we need to check whether a variable exists or whether the value has a valid value.
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.