Previously, jquery was used for the interface. Now, we use the prototype that comes with rails because of the many ajax effects.
Because jquery is used more often, it is similar to changing a framework, but there are many differences in details...
1.
Today, almost all projects are submitted through ajax. During the test, I found that the data obtained after each submission is the same. debugging can eliminate the background code issue, so the problem must be at the front-end. Each time the cache
I will continue to post an article about the web Front-end custom control-ComboBox (drop-down box). In the past, I used the drop-down box control to worry about the ugly style. Now I want to share this control, hope that useful colleagues can add to
Page js CodeCopy codeThe Code is as follows:$. Ajax ({
Url :'...',Type: 'post ',DataType: 'xml ',Error: function (xml ){Alert ("Error loading XML document" + xml );},Success: function (xml ){$ (Xml). find ("X"). each (function (I ){Alert ($ (this).
Copy codeThe Code is as follows: automatic Date input control
birthday: *
Js execution sequence on the html page:1) the first execution in the head label2) execution in the body Tag3) when the onload event is added to the body tag, the
Copy codeThe Code is as follows:Document.all('iframe1'%.content%w.doc ument. getElementById ("deptName"). width;Parameters (registry.parent.iframe1.doc ument. body). find ('# deptname'). width ();Access is denied when IFRAME is called across domains.
The following code implements the control form submissionCopy codeThe Code is as follows:Function shangchuan (){Var filepath = document. getElementById ("file"). value;Alert (filepath );If (filepath = ""){Alert ("select the uploaded file!
[Original text translation]The JQuery UI Draggable plugin enables you to drag selected elements with the mouse.The element of Draggable is affected by css: ui-draggable. css: ui-draggable-dragging during the drag process.If you need not only drag
I. URL of JavaScript Static Page value transferPass through the URL to pass the value. Connect the information to be passed to the URL.Post.htmCopy codeThe Code is as follows:Read.htm
Copy codeThe Code is as follows:
Advantage: The value is
You can watch it later!Copy the following blue code and save it as an html file.The Code supports IE6, 7, 8, firefox, and Chrome browsers.Copy codeThe Code is as follows: javascript controls the transparency attribute of the Div layer, which is
Sometimes we need to use cookies to save the user name and record the login status. How can we correctly determine whether the user cookie exists? You cannot simply use! =.Copy codeThe Code is as follows:A = getCookie ("username3 ");C_start =
The. load method does not set the default value of the cache parameter to true. Especially in IE browsers, the general ajax methods are cache = true!Solution:1. Use the. ajax method and set the cache parameter to false.Copy codeThe Code is as
If you use str. replace ("-","! ") Will only Replace the first matched character.Str. replace (/\-/g ,"! "), You can replace all matched characters (g is the global flag ).
Replace ()The replace () method returns the string that results when you
Copy codeThe Code is as follows:// Import the JQuery package// Write the JQuery event control page class management Student Management class id class name remarks A1331 Java excellent A1332 Java Web excellent NO. name gender class 100
PrefaceThe usage of this in JavaScript has been described in more detail in the network. You can refer to the reference materials and networks in this article. This article, combined with network collection, tries to elaborate on the usage of this
1. Formpanel has the same data source and grid, and uses Form. getForm (). loadRecord (row); then the data can be automatically loaded into the corresponding control in formpanel.2. The formpanel data source is independent. After the store is passed
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.