摘要: c#const与readonly关键字的比较C#中,const 与readonly是两个比较有用的关键字。const 与 readonly 定义的数据成员在初始化都不能再改变。比如定义了public class MathUtitlity{public const double PI = 3.14;public readonly double E = 2.782;}class Program{static void Main(string[] args){MathUtitlity math = new MathUtitlity();math.E = 2.5;//编译错误,不能改变已经初始化的re 阅读全文
posted @ 2014-03-29 13:04 Tsy_blog 阅读(536) 评论(0) 推荐(0)
摘要: 使用方法: $.browser.['浏览器关键字'] 代码如下:$(function() { if($.browser.msie) { alert("this is msie"); } else if($.browser.safari) { alert("this is safari!"); } else if($.browser.mozilla) { alert("this is mozilla!"); } else if($.browser.opera) { alert("this is opera&qu 阅读全文
posted @ 2014-03-29 11:27 Tsy_blog 阅读(118) 评论(0) 推荐(0)
摘要: /*将具有autoheight属性的div元素设置为自动高度用法:给需要的div元素添加autoheight属性,如:...可以修改选择符,如写为".autoheight"或是其它的以匹配需要的元素。*/$(function(){var_jahDivs=$("div[autoheight]");if(_jahDivs.length>0){_jahDivs.css("overflow","auto");$(window).resize(function(){var_addHeight=$(window).hei 阅读全文
posted @ 2014-03-29 11:12 Tsy_blog 阅读(337) 评论(0) 推荐(0)