里面是对一个body的属性进行server的一些设定,不过可以衍生到其他的一些htmlcontrol
来源:互联网 发布:linux 类似telnet命令 编辑:程序博客网 时间:2024/05/16 16:09
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
The second method uses the Style object property of the HtmlControl object. By making calls to the Style object property's Add method, you can add custom styles to your <body> tag. These are implemented as an inline style tag when it is rendered to the browser.
Because of this, you may want to research whether the style you are going to implement is compatible with the browser you are targeting.
The techniques used here can be used to set the properties of any HTML control that does not have a server Control equivalent. An example would be the <p> tag.
Sample code 1: Use the "Attributes" collection of the body tag
<%@ Page Language="C#" %>
<script language="C#" runat="server">
protected void Page_Load(object sender, EventArgs e) {
body.Attributes["BgColor"] = "#CCCCCC";
}
</script>
<body id="body" runat="server">
This is the body text.
</body>
Sample Code 2: Use the "Style" collection of the body tag
<%@ Page Language="C#" %>
<script language="C#" runat="server">
protected void Page_Load(object sender, EventArgs e) {
body.Style.Add("background-color","#CCCCCC");
}
</script>
<body id="body" runat="server">
This is the body text.
</body>
Notes:
Be sure to add the runat="server" attribute to your body tag and give it an ID
里面是对一个body的属性进行server的一些设定,不过可以衍生到其他的一些htmlcontrol新手看看,或者有点...';return true">
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
The first code snippet below uses the Attributes collection of the <body> tag (implemented as an HtmlControl object) to reference its standard HTML attributes. This method gives you programmatic access to any of the HTML attributes that you normally hard-code into your <body> tag.The second method uses the Style object property of the HtmlControl object. By making calls to the Style object property's Add method, you can add custom styles to your <body> tag. These are implemented as an inline style tag when it is rendered to the browser.
Because of this, you may want to research whether the style you are going to implement is compatible with the browser you are targeting.
The techniques used here can be used to set the properties of any HTML control that does not have a server Control equivalent. An example would be the <p> tag.
Sample code 1: Use the "Attributes" collection of the body tag
<%@ Page Language="C#" %>
<script language="C#" runat="server">
protected void Page_Load(object sender, EventArgs e) {
body.Attributes["BgColor"] = "#CCCCCC";
}
</script>
<body id="body" runat="server">
This is the body text.
</body>
Sample Code 2: Use the "Style" collection of the body tag
<%@ Page Language="C#" %>
<script language="C#" runat="server">
protected void Page_Load(object sender, EventArgs e) {
body.Style.Add("background-color","#CCCCCC");
}
</script>
<body id="body" runat="server">
This is the body text.
</body>
Notes:
Be sure to add the runat="server" attribute to your body tag and give it an ID
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 里面是对一个body的属性进行server的一些设定,不过可以衍生到其他的一些htmlcontrol
- cell的一些属性设定
- Fragment的一些其他属性
- tomact的一些设定
- C++友元friend --c++利用friend修饰符,可以让一些你设定的函数能够对这些保护数据进行操作
- C++友元friend --c++利用friend修饰符,可以让一些你设定的函数能够对这些保护数据进行操作
- C++友元friend --c++利用friend修饰符,可以让一些你设定的函数能够对这些保护数据进行操作
- C++友元friend --c++利用friend修饰符,可以让一些你设定的函数能够对这些保护数据进行操作
- C++友元friend --c++利用friend修饰符,可以让一些你设定的函数能够对这些保护数据进行操作
- android里面的一些属性和使用方法
- document.body的一些用法
- 事件捕获,点击其他body的其他区域,对body特定区域进行操作且排除此区域点击触发
- 对html与body的一些研究与理解
- 对html与body的一些研究与理解
- 对html与body的一些研究与理解
- 对html与body的一些研究与理解
- 对html与body的一些研究与理解
- 对html与body的一些研究与理解
- 社区(php&&mysql)五
- 关于动态导出SQL数据库的SCRIPT
- 社区(php&&mysql)四
- C#学习笔记之五(ADO.net)
- 社区(php&&mysql)三
- 里面是对一个body的属性进行server的一些设定,不过可以衍生到其他的一些htmlcontrol
- 社区(php&&mysql)一
- 关于在连接数据库时候命名管道不工作的官方解决办法
- 连接SQL SERVER公共类
- 社区(php&&mysql)二
- C# v.s java 再贴+评点
- 人大复印资料处理程序_补充篇
- 转新技术网:在ASP.NET中使用.NET组件
- 解决一个.NET联接SQL的问题 yiyang(转贴)