HTML input read-only
There are two ways to achieve the read-only effect of input: Disabled and readonly.
Naturally, the two effects are read-only and cannot be edited, but they are quite different.
Disabled indicates that the input is invalid and its value is not passed to anyProgramSuch as ASP and PHP.
Readonly is not editable and does not affect the value transfer.
Disabled usage:
<Input type = "text" name = "username" value = "James" disabled>
Readonly usage:
<Input type = "text" name = "partnumber" value = "1500" readonly>
Note:
1. The performance of IE is the same, but the whereabouts of FF are unknown. readonly can aggregate, but disabled cannot, and the default background color is displayed.
Share several CSS style tips:
######################################## #########################
1. Remove the underline and blue font of The Link. When the mouse moves to the link, the underline Of the link is displayed and the font turns red.
A: link {
Color: #666666; text-Decoration: None
}
A: hover {
Color: # ff0000; text-Decoration: underline
}
2. If an image is added to the link, you will find that the image has a blue border, which is very ugly. It is very easy to remove the blue border of the image in the link.
Border = "0"
Example: <a href = "url"> </a>
You can...
####################################### 3
20121207 JavaScript problems:
When JS is used for addition operations, the addition operation is not performed using the plus sign (+). Instead, the addition operation is converted into a string connection and the numbers are spliced into a numeric string. How can this problem be solved?
The solution is simple: Use the eval () function where + is used, for example:
Function add (a, B ){
Return eval (A) + eval (B );
}
This solves this problem