In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
Most people do not understand the knowledge points of this article "jquery how to modify title value", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "jquery how to modify title value" article.
Jquery modify title value method: 1, using text (), you can modify the title tag value, syntax "$(" title "). Text (" new value ");"; 2, using attr (), you can modify the title attribute value, syntax "element .attr (" title "," new value ");".
The operating environment of this tutorial: windows7 system, jquery1.10.2 version, Dell G3 computer.
In HTML, there are two types of title values:
Content value of the title tag
The property value of the title attribute
So how to use jquery to modify these two title values, let's introduce it to you.
1. Jquery modifies the title tag value
Tags define the title of the document and are required in all HTML documents.
Elements:
Define the title in the browser toolbar
Provide the title when the page is added to favorites
The page title displayed in the search engine results
You can use the text () method to modify the value of the title tag. The text () method returns the text content of the selected element.
Example:
The old title of the document $(document) .ready (function () {$("button") .click (function () {$("title") .ready ("New document title") });}); modify the title document title
2. Jquery modifies the value of title attribute
The title attribute specifies additional information about the element.
This information usually displays a tooltip text (tooltip text) when you mouse over the element.
You can use the attr () method to modify the value of the title property, which sets the value of the specified attribute of the selected element.
$(document) .ready (function () {$("button") .click (function () {$("div"). Attr ("title", "new title value");}) This is a test text.
Modify the title attribute of an element
The above is about the content of this article on "how to modify the title value of jquery". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.