Solution for modifying the type attribute of input in ie8: ie8input
Abstract:
Now, you need to check the show plaintext check box to display the password entered by the user in plaintext, the first thought was to modify the type of the input box to determine whether to display the plaintext or ciphertext, and use jQuery's attr for testing. The test results are chrome, Firefox, and ie9 +, an error will be reported under ie8. The following reason is found. In ie8, the type attribute of input cannot be modified, and another idea is implemented.
If the text box is selected, replace the input box with type = "text". If the text box is not selected, replace the text box with type = "password". The Code is as follows:
<! DOCTYPE html>
Summary:
This article does not have any technical content, but this interaction still exists. Write this article mainly considering the compatibility issues below ie8. If you have such interactions in your project, you can refer to them or share them with me in a better way.
How can I change the value of a text box (input type = "text") based on the name attribute?
$ (": Text [name = 'xxx']"). prop ('value', 12 );
Detailed description of the <input> tag type attribute Image in HTML
<Input type = "image" src = "images/button.gif" width = "60" height = "19">
This type is the image domain, and the image is images/button.gif. Add an onclick = "form. action = xxxx. jsp; form. submit ();" when you click this image, it will jump to xxxx. jsp.
In fact, there are some other attributes. You can also click an image to change the image usage. The following shows its events.
Event Description onactivate is triggered when the object is set to an active element. The onbeforeactivate object is triggered immediately before it is set to the current element. Onbeforecut is triggered in the source object before being deleted from the document in the central region. Onbeforedeactivate is triggered immediately before activeElement changes from the current object to another object in the parent document. Onbeforeeditfocus is triggered before an object contained in an editable element enters the user interface activation state or before the Editable container becomes the control selected area. Onbeforepaste is triggered on the target object before being pasted from the system clipboard to the document in the selected area. Onblur is triggered when the object loses the input focus. Onclick is triggered when you left-click an object. Oncontextmenu is triggered when you right-click the client area to open the context menu. Oncontrolselect is triggered when you want to create a control area for this object. Oncut is triggered on the source element when an object or selected area is deleted from the document and added to the system clipboard. Ondblclick is triggered when you double-click an object. Ondeactivate is triggered when activeElement changes from the current object to another object in the parent document. Ondrag is triggered continuously on the source object during the drag operation. Ondragend is triggered on the source object when you release the mouse after the drag operation is complete. Ondragenter is triggered on the target element when you drag an object to a valid drag target. Ondragleave is triggered on the target object when you move the mouse out of a valid drag target during the drag operation. Ondragover is triggered continuously on the target element when the user drags an object across a valid drag target. Ondragstart is triggered when the user starts to drag the selected text area or the selected object on the source object. Ondrop is triggered on the target object when the mouse button is released during the drag operation. Onfilterchange is triggered when the visual filter changes the status or completes the conversion. Onfocus is triggered when the object obtains the focus. Onfocusin is triggered before the element is set to focus. Onfocusout is triggered immediately after moving the focus to other elements on the element with the current focus. Onhelp is triggered when you press the F1 key when the browser is the current window. Onkeydown is triggered when you press the keyboard button. Onkeypress is triggered when you press the literal key. Onkeyup is triggered when the user releases the keyboard button. Onlosecapture is triggered when an object loses Mouse capture. Onmousedown is triggered when you click an object with any mouse button. Onmouseenter is triggered when you move the mouse pointer to an object. Onmouseleave is triggered when the user moves the mouse pointer out of the Object Boundary. Onmousemove is triggered when you move the mouse over an object. Onmouseout is triggered when you move the mouse pointer out of the Object Boundary. Onmouseover is triggered when you move the mouse pointer to an object. Onmouseup is triggered when you release the mouse button when the mouse is over the object. Onmousewheel is triggered when the scroll wheel button is rotated. Onmove is triggered when the object is moved. Onmoveend is triggered when the object is stopped. Onmovestart: when the object begins to shift... the remaining full text>