How does jQuery obtain the Tag Name of the currently specified element?
How to obtain the Tag Name of the currently specified element:It is not common in actual applications to obtain the tag name. You may never be able to use it. However, here is
EnvironmentPython3.6+selenium3.0.2+ie11+win7"Positioning Method"1. Location by IDMethod: find_element_by_id (' xx ')2. Positioning by nameMethod: Find_element_by_name (' xx ')3. Positioning by class nameMethod: Find_element_by_class_name (' xx ')4.
Js this function call does not need to capture the id, name or tag name again
This is the node captured by the js to be executed. In this way, you can capture the id, name, or tag name without writing document. getElement in js. The specific
There are 3 common ways to get elements, respectively, by element IDs, by tag names, and by class names.
getElementById
The DOM provides a method named getElementById that returns a Node object with its corresponding ID attribute. When used, be
This is your current to execute JS captured node, so in JS can not document.getelement such as to capture the Id,name or tag name, save some trouble. The general use of obj instead.
Copy Code code as follows:
function
This article mainly introduces the use of the name attribute of the HTML form tag, and finally the difference between name and ID, which is described in this article as a description of the advantages of the name tag, let's take a look at this
This is the node captured by the js to be executed. In this way, you can capture the id, name, or tag name without writing document. getElement in js, saving you some trouble. It is generally replaced by obj.Copy codeThe Code is as follows:Function
C # Object serialization:
Public class xmlhelper {// // serialize the object to an XML string // Public static string xmlserialize (t obj) {string xmlstring = string. empty; xmlserializer = new xmlserializer (typeof (t); // using (textwriter =
No more nonsense to say, directly to everyone paste code, the key code as described below:
New Document
div1
div2
Detailed Explanation:
The above is a small set up to introduce the jquery basic selector of the label name
Script Type = "Text/JavaScript" > Function Elementname (EVT) {EVT = EVT | Window. event; VaR Selected = Evt.tar get | EVT. srcelement; alert (selected. tagname);} window. onload = Function (){ VaR El = Document.
label in struts. xml
When the system becomes largerStruts. xml
There is a lot of content, so we can useModular
Method
Distribute different configuration files in different configurations, and then load them in the same way by struts. xml.
For
Sometimes we want to get the name of a tag, for example:a get "div". Take a look at the following example:
There is a class= "a" on the page, possibly input, or a normal div or span tag, now we want to add a value to this tag "value1". If it is
CodeYou have already tested it. Add the try catch Statement by yourself. Remember to release the resource after an error occurs.
After this operation is performed, the operated tag will be removed.
Code
Code highlighting produced by
Let's take a look at this.FormElement:
>
Think about it. When document. getElementById ("updForm"). getAttribute ("id"), will it be "updForm" or input in the form?
In fact, updForm cannot be obtained. The browser returns an Object
Maybe ID
OneCommon Tags1.1 JSP in a total of 8 tags, which are commonly used in 6, this article will introduce the 6 commonly used tags. 1.2 6 kinds of label 1.The tag indicates a file that contains either static or dynamic.Grammar:OrNote:1. Page= "path" is
JS get document.getElementsByTagName (tagname)
The order in which the getElementsByTagName () method returns elements is the order in which they are in the document.
If you pass the special string "*" to the getElementsByTagName () method, it
If this official template explanation looks too abstract, can refer to:Parsing engine Overview Template Design specification code referenceTag reference: Arclist (artlist,likeart,hotart,imglist,imginfolist,coolart,specart) field channel MyTag vote
Article Turn Confessions Black Feather teaches PythonEarlier we saw the selection of elements based on the ID, class attribute, tag name.If the element we want to select does not have an ID or class attribute, then we can usually select the element
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.