The inside is a set of server for a body property, but it can be derived to some other HTMLControl
Source: Internet
Author: User
The snippet below uses the Attributes collection of the <body> tag (implemented as an HTMLControl object) To reference its standard HTML attributes. This method gives your programmatic access to any of the HTML attributes, normally hard-code into your <body> Tag.
The second method uses the Style object of the HTMLControl object. By making calls to the Style object "Add Method", you can add custom styles to your <body> tag. These are implemented as a inline style tag when it's rendered to the browser.
Because of this, your want to whether the style for you are going to implement are compatible with the browser are targeting.
The techniques used here can is used to set the properties of ' any HTML control ' does not have a Server control equival Ent. An example would is the <p> tag.
Sample code 1:use The "Attributes" collection of the body tag
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.