2011年11月9日

【转载】jquery操作cookie

摘要: jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { // name and value given, set cookie options = options || {}; if (value === null) { value = ''; options.expires = -1; } var expires = ''; if (options... 阅读全文

posted @ 2011-11-09 14:22 BarneyZhang 阅读(393) 评论(0) 推荐(0) 编辑

【转载】window.parent和window.opener区别

摘要: 下面一段代码是关于window.parent和window.opener区别来讲的,我们如果要用到iframe的值传到另一框架就要用到window.opener.document.getElementById(name).value = uvalue;这种形式哦。window.parent能获取一个框架的父窗口或父框架。顶层窗口的parent引用的是它本身。可以用这一点特性来判断这个窗口是否是顶层窗口。如:Codefunction IsTopWindow( win ){ if( win.parent == win ) return true; else return false;}window 阅读全文

posted @ 2011-11-09 12:05 BarneyZhang 阅读(511) 评论(0) 推荐(0) 编辑

导航