Response.Write("<script>disDiv();</script>");后页面样式改变,样式表不起作用,求解~~!
一个项目,用asp.net4.0 C#在做,有用到ajax,
一个程序中,有要上传文件,因为ajax和FileUpload的冲突,找了很多资料,试了都不行,用Trigger设定都出错,
于是就放一个在UpdatePanel后面的层里面,用display控制显示和隐藏。
在操作完成(写数据库和上传文件)后,Response.Write("<script>disDiv();</script>");让层隐藏,结果,页面的样式表不起作用,字体变大了。
哪位兄弟有遇见过这种情况呀,怎么解决呀。
附1:IE9 运行后的代码(PostBack后):
<script>disDiv();</script><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><script language="javascript" type="text/javascript"> function showDiv() { divAddMat.style.display = ""; } function disDiv() { divAddMat.style.display = "none"; }</script> <style type="text/css"> .style1 { height: 25px; } </style><style type="text/css"><!--body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; font-size: 10pt;}--></style></head>……