易截截图软件、单文件、免安装、纯绿色、仅160KB

js/css在ajax UpdatePanel 中没有效果的解决方法

js没效果:如果在以UpdatePanel的方式的局部回传中,普通的Javascript代码在这种局部回传中就不会在触发了,就必须使用scriptmanager.RegisterClientScript方法(在<form>后面注册<script>)和scriptmanager.RegisterStartupScript方法(在</form之前注册<script>)
在你的用户控件的后端的某个合适位置,采用合适的注册方法,比如说load事件可以写以下代码:
//你的javascript代码
string script="var a='helloworld';alert(a);";
this.page.scriptmanager.RegisterStartupScript(this.page,typeof(string),"scriptforusercontrol",script,true);
css没效果:
string   s   =   @"<LINK   href="Css/Styles5.css"   type="text/css"   rel="stylesheet">";  
ClientScript.RegisterStartupScript(this.GetType(), "", s);
这样就可以了。


相关文档:

CSS Containing Floats

原文网址:http://www.complexspiral.com/publications
Containing Floats
As powerful and useful as they are, floats can make for tricky layout tools. Chances are that you may have seen something like the situation shown in Figure 1, which is accomplished with just two div elements, each with a floate ......

CSS的边界重叠规则

In this specification, the expression collapsing margins means that adjoining margins (no non-empty content, padding or border areas or clearance separate them) of two or more boxes (which may be next to one another or nested) combine to form a single margin.
In CSS 2.1, horizontal margins ne ......

一 css的优先级

一 css的优先级
今天有人跟我说css
hack中用!important来区分ie6,因为ie6不支持!important,是的在很早以前我也是用过这种方法写hack,但是后来就基本不用了。本来我对他谁的ie6不支持!important也没什么异议,可是正好在前几天正好用个这个!important属性解决了一个样式优先级的问题,而且是支持ie6的,这是为什么呢? ......

ajax 二级联动

function CreateXmlHttp()
{
if(window.ActiveXObject)
{
try
{
XmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){};

try
{
XmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){};

}
else if(window.XMLHt ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号