Modifying page content is the most common function of Javascript, including modifying existing page elements or adding new HTML elements. JQuery provides two methods to implement this function-text () and html (). Text () is the processing of plain
I haven't used JS to write code for a long time. As a result, a problem occurred while calculating the date, which plagued me for half a day. Finally, I figured out the root cause of the problem. After selecting the month list item, I get the Year
The following extend functions in my base. js can be used to assign values to attributes or even function handles in json format.
1. You can write various assignment statements in your work.
For example, the most common obj. style. display = "none "
Sometimes we need to get the link parameters on the client. A common method is to treat the link as a string, break it down according to the link format, and then obtain the corresponding parameter values. This document describes how to implement
When entering a form in a browser, you can directly press Enter in the text box to submit the form, which is very convenient. The condition is:
In IE and Firefox
1,
The "action" Field of the attribute is required;
2. There is an "input" of
In this example, the syntax for converting to VML is used. If you replace it with another SVG syntax, you can convert it into an SVG image and add any number of units. Source Document
Template document (JavaScript code is reduced here and the
In this chapter, I will explain the code of the content table that all pages on my website are running. It will generate all h3 and h4 lists on this page, and then add a link to them. If you want to do the same, you also need my getElementByTagNames
JQuery provides the css () method for Embedded element style change. css () methods are diverse in usage. Either of them accepts two input parameters: style attributes and style values, separated by commas. For example, to change the link color, we
When the mouse focus is moved to the password input box, the Javascript script is used to automatically verify whether the user name format is correct or not.
The Code is as follows:
User name:
// The verification result is displayed. Note
Obtain the absolute X and Y coordinates of an element on the page. You can use the offset () method: (set the body property to margin: 0; padding: 0 ;) var X = $ ('# divid '). offset (). top;
Var Y = $ ('# divid'). offset (). left;
Obtain the
This is a three-dimensional picture browser. The layer Positioning Technology z-index is used to highlight the picture being viewed by the browser, and the pictures on both sides are translucent. Very personalized! PS: Display. You can adjust the
The XmlTreeLoader example of ExtJs3.1 tossed me over the last night. The official example shows no problem. You can load xml data, but the local IIS does not work.
Preface
Keyword: ExtJs 3.1 XmlTreeLoader Example Error, XmlTreeLoader Error,
Three levels of provincial/municipal joint menus, ieff test passed, support multiple coexistence, support event demo1 is the simplest implementation, page id configuration needs to be written in js files, suitable for simple situations
Dynamic
The html control in the drop-down box has always been difficult to understand. Before that, the & lt; div & gt; & lt; ul & gt; & lt; li & gt; & lt; li & gt; & lt; ul & gt; & lt; div & gt; version drop-down box. I think this drop-down box can satisfy
In front-end development, JavaScript and CSS information are always involved. For example, a set of style information is cascading for an HTML element. The value of the width attribute is 80 PX. Then, call the script to read this value. The result
To understand the Event attributes, I will provide some sample code here. In this category, there are very serious browser compatibility problems. When we want to read some information about the Event, it is often lost in a large number of
I have just learned a small js technology and it is quite fun. I will post some small examples to share my learning achievements with you. Haha ~~ In this example, you can drag the icon to any place you want.
Code
The Code is as follows:
In this chapter, I will explain how to access an event object. Now we have registered an event handler and want to learn more about the event. We want to know the mouse position when the event occurs, and what keys the user presses. These are all
In this chapter, I will explain two advanced time registration models: W3C and Microsoft. Because neither of these methods can be cross-browser, they do not have many use cases. Both W3C and Microsoft are developing their own event registration
Implementation is similar to the effect of entering text numbers on the Photoshop control panel, so the name is PsWheel. It is used to control the input numeric text box to realize the sliding up and down of the scroll wheel to change the value. It
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