摘要: <iframe id="iframe1" name="mainFrame" onload="this.height=mainFrame.document.body.scrollHeight" src="DetailsPage.aspx"></iframe> 阅读全文
posted @ 2010-09-27 23:04 深海大虾 阅读(280) 评论(0) 推荐(0)
摘要: public Color? TextColor { get { return _textColor; } set { _textColor = value; } } 今天看程序代码,发现Color? TextColor 这个属性的申明,感觉很不能理解,后来在google上搜索了一下,原来这是vs2005开始c#新有的特性,具体的说也可以是C#2.0的新特性。 下面是我搜索到得相关描述: Nullable Types in C# One of the "late breaking" features in C# 2.0 is what is known as "Nu 阅读全文
posted @ 2010-09-05 18:56 深海大虾 阅读(2740) 评论(0) 推荐(0)
摘要: //首先要在PageLoad()事件中注册属性 protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Button1.Attributes.Add("onclick", "return checkSame()");//为Button1添加onclick()事件 ,Button为服务器控件 }//注意:checkSame()这是一个写在aspx面页的js函数,必须有返回值,为:true 或 false } //接着写Button1的onclick事件,如果刚才的c 阅读全文
posted @ 2010-09-05 18:49 深海大虾 阅读(686) 评论(0) 推荐(0)
摘要: z-index : a:hover{ z-index:999;}绝对定位的PNG背景透明层: a{ position:relative;} 阅读全文
posted @ 2010-08-29 20:37 深海大虾 阅读(253) 评论(0) 推荐(0)
摘要: <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style type="text/css">.content a.left{ float:left;}#yz{ margin-left:90px;}</style& 阅读全文
posted @ 2010-08-20 19:40 深海大虾 阅读(15098) 评论(0) 推荐(0)
摘要: ScriptManager.RegisterStartupScript(this, GetType(), "js", "alert('成功');self.location='addnews.aspx'", true);直接在后台写JS 非常的方便实用 阅读全文
posted @ 2010-08-20 19:25 深海大虾 阅读(194) 评论(1) 推荐(0)
摘要: 工作中的代码片段 写出来留作以后对比参考网上没找到自己想要的全选反选代码 干脆自己写了个比较臃肿的 相信还有更加简单的方法jquery代码===================================================$(document).ready(function() {//当页面加载完成时 $("#select_all").click(function() {//当点击全选的checkbox时 if ($("#select_all").attr("checked")) {//如果全选的checkbox为选 阅读全文
posted @ 2010-08-18 19:18 深海大虾 阅读(4052) 评论(0) 推荐(0)
摘要: 通过只对IE的expression属性来实现,即通过expression调用JS来实现position:fixed效果。 目前网上有的比较多的是这种解决方案(纯CSS): html{overflow:hidden;} body{height:100%;overflow:auto;} #rightform form{position:absolute;right:30px;top50px;} 这个方法有一个bug未解决:在IE6下会把所有position:absolute都变成"浮动"的元素;还有使用js方法滚动滚动条时会出现对象闪烁,如下方法结合了CSS和js的办法,解决了 阅读全文
posted @ 2010-08-03 11:16 深海大虾 阅读(254) 评论(0) 推荐(0)
摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="001.aspx.cs" Inherits="test_001" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns=& 阅读全文
posted @ 2010-07-31 15:42 深海大虾 阅读(591) 评论(0) 推荐(0)
摘要: IE浏览器中iframe会出现默认的白色背景及边框,影响美观。有边框的正常,但IE默认的HTML背景色为白色,而FF默认背景色为透明色。此外iframe在IE中长宽为300*150,其中边框为2px宽;FF 中为304*154,边框也同样为2px。(这里所说宽算边框的宽度)现有两个文件:main.html 和t ransparentBody.html其中transparentBody.htm是嵌套在main.htm之中,为了便于看效果在BODY中加入蓝色背景请看效果图:main.html代码如下: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 阅读全文
posted @ 2010-07-31 15:30 深海大虾 阅读(2633) 评论(0) 推荐(0)