Setting an event for an HTML hyperlink does not use href to complete the jump _javascript technique

Sometimes, we need to use the hyperlink and not use href to complete the jump, but rather like: this way. This way, you won't let the page jump. But it also brings some negative questions, such as the title of the page becomes "#", or the page

Example shows why not use Javascript_javascript tips in the line

A lot of people have used JavaScript that way. Copy Code code as follows: Save The code above is easy to use and is supported by all browsers Although I have read some books very early, said Html,css,js separate, easier to

Self-made file Upload JS control can support IE, Chrome, Firefox etc_javascript skills

Copy Code code as follows: (function () { if (window. FileUpload) { Return } Window. FileUpload = function (id, URL) { This.id = ID; This.autoupload = true; This.url = URL; This.maxsize = null; This.extensions = null; This.dropid =

Window.location The problem-solving method of non-jump _javascript skill

Write code today when encountered a problem: the HTML using the OnClick event to achieve window.location = URL of the jump, in the embedded element plus the href= "Javascrit:;" 's Properties. At this time this sentence window.location jump invalid.

A sample read-write operation for cookies in JS _javascript tips

Cookies are a small piece of information, with key/value pairs of information stored in the computer's hard disk string, the cookie storage capacity of about 4KB, different browser manufacturers on the size of the cookie limit slightly difference;

The realization of the automatic rotation effect of JS pictures with screenshots _javascript tips

Today is not the state, quiet 51 is coming, I want to play. Well, it's late, gossip not to say, look at the image with JavaScript automatically rotation effect, first look at the picture The following is the specific code, or relatively simple.

Baidu Mobile version of the URL code decoding example _javascript tips

Copy Code code as follows: var decode = function (m) { try { m = decodeURIComponent (m); catch (e) {} var s = m.split ("%"); if (S.length > 1) { S.shift (); for (var i = 0; i var t = s[i]; t = parseint (T, 16); t = t + 256; t = t-201;

Find a element by URL to apply case _javascript tips

Give an example of a previous project: When you add a student, there is no class data. Need to automatically jump to the class display page.Question: Students, classes and other data is placed in the IFRAME inside the JSP. The student-managed button

JS Write mask layer Landing box and couplet ads and automatically follow the rolling _javascript tips

Use JS to write mask layer landing box and couplet ads and automatically follow the scroll bar scrolling to keep the user can always see Okay, it's late. Nonsense, the code in particular detailed comments, please see the code. Copy Code code

How long does a common browser prompt "script runs too long" summary _javascript tips

Now the web, the impact of user access is not only the speed of file downloads, when all files from the server download, from the browser to start rendering to the user can respond to the time, this time will still be consumed very long, and because

On the methods of href and SRC variables and assignment of IMG _javascript tips

Copy Code code as follows: Untitled Document Currently can modify href, but src is not correct, is under study, if you know the partners please leave a message

JS Computing page Residence time Code _javascript skills

Copy Code code as follows: "Http://www.w3.org/TR/html4/loose.dtd" > Show Stay Time You have stayed at this site:

JS Click event link Problem solving _javascript skills

Copy Code code as follows: Copy Code code as follows: Trigger window Trigger window 2:ajax submit do not put the button on the submit

JS implementation of the string of 16-encoded unencrypted _javascript technique

Today I see some people in the group asked about the hexadecimal coding problem, so use JS to write a small program to convert, remember: This is just coding, not encryption! String hexadecimal encoding: Copy Code code as follows: Str=

Use native JS package webapp sliding effect (inertial sliding, sliding rebound) _javascript technique

PC Mobile End compatible IE 6.0+, FF 1.5+, Safari 2.0+, Opera 9.0+ inertia help, slide rebound Façade mode Copy Code code as follows: Window.onload = function () { /* TEST Data * * var insert = '; for (var i = 0; i Insert + = '

Several methods of automatic folding expansion of JS operation tree nodes _javascript skills

1. Method One Copy Code code as follows: var tree = l5.getcmp (' Edocoutfilerelationtree '); Add Selection tree, node Auto fold Tree.on ("click", Function (node,e) { Node.getui (). Togglecheck (True); }); Tree.root.expand ()

JS judge, check MAC address of 2 instances _javascript skills

Method One: Copy Code code as follows: var temp =/[a-fa-f0-9]{2}:[a-fa-f0-9]{2}:[a-fa-f0-9]{2}:[a-fa-f0-9]{2}:[a-fa-f0-9]{2}:[a-fa-f0-9]{2}/; if (!temp.test (Document.mac.value)) { return false; } Method Two:

Using jquery.sortelements to implement table sorting _javascript techniques

The ability to implement table sorting in the project. There are many solutions on the web, many of them based on jquery. Jquery.tablesorter, size 17KB, but his home page in the Ie10 under the compatibility of a bit of a problem. DataTables, size 7

element is not displayed when setting width/height in IE using currentstyle to get auto_javascript tips

We know that getting the actual width of an element can use the Currentstyle property in IE. However, if you do not display the width of the element, then use this property to get the value of auto. As follows Copy Code code as follows:

JS Date Linkage Example _javascript tips

debugging needs to join jquery file Copy Code code as follows: -Please select- " > year -Please select- " > Month -Please select-

Total Pages: 64722 1 .... 44702 44703 44704 44705 44706 .... 64722 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.