ie下面,会出现window.close()的时候出现询问窗口,消除它的方法为:
ie6及以下
window.opener = null;
window.close();
ie7及以上
window.opener = null;
window.open("","_self");
window.close();
其他浏览器支持 window.opener.dom_id.src的写法,但是ie不支持,解决的办...
|
|
自从HTML5能为我们的新网页带来更高效洁净的代码而得到更多的关注,然而唯一能让IE识别那些新元素(如<article>)的途径是使用HTML5 shiv,感谢remy sharp为我们提供了这个迷你脚本来解决IE支持HTML5的问题。
使用和下载
html5.js必须在页面head元素内调用(因为IE必须在元素解析前知道这个元素,所以这个js文件不能在页面底部调用。)
一个程序,在火狐、谷歌下面是正常的,但是在IE下面提示参数无效,经过分析,发现是action里面为空了。
一般来说,我们做表单提交,只要是post,而且是提交到当前页面的话,都是可以忽略action里面的内容的,看来validform没有对为空做处理,改action为完整的地址,就正常了。
思路,js操作滚动条进行偏移,然后判断是否有偏移
$("#test1").scrollTop(10); //操作滚动条 $("#test1Result").html($("#test1").scrollTop() > 0 ? "有滚动条!" : "没有滚动条!"); //判断是否有滚动 $("#test1").scrollTop(0); //滚动条返回顶部
 ...
先看一下Discuz!中的js代码
function Html5notification() { var h5n = new Object(); h5n.issupport = function() { var is = !!window.webkitNotifications; if(is) { if(window.webkitNotifications.check...
1.eval方法
function strToJson(str){ var json = eval('(' + str + ')'); return json; }
2.new Function方法
function strToJson(str){ var json = (new Function("return " + str))(); return json; ...
在MySQL下运行完下面这个建表语句后。 如何从数据字典中,检索出这个表的字段的相关信息?
DROP TABLE IF EXISTS test_table;
CREATE TABLE test_table(
Test_ID int NOT NULL AUTO_INCREMENT PRIMARY &nb...
xml转array
字串
$xml = simplexml_load_string($data);
$array = json_decode(json_encode($xml),TRUE);
文件
$xml = simplexml_load_file($data);
$array= json_decode(json_encode($xml),TRUE);
或者
$array = (array) sim...
PHP5.3.27 的扩展php_opcache.dll
测试平台:Windows 2008 R2 x64 (IIS7.5 FastCGI,Apache2.2.23,Apache2.4.3, Nginx 1.2.9)
包含 Non Thread Safe 和 Thread Safe
如果用的是 FastCGI 请使用 Non Thread Safe 版
php_opcache.dll 的使用方法
php.i...
function whois_query($domain) { // fix the domain name: $domain = strtolower(trim($domain)); $domain = preg_replace('/^http:\/\//i', '', $domain); $domain = preg_...
//娱乐 $a = array(11,22,3523,45,24,564,55,34,56423,5,34,654,4); $count = count($a); for($i=0;$i<$count;$i++){ $min = $a[$i]; $mink = $i; ...
代码如下
<?php /** * 获取某段时间内修改的文件及结构 * * @author aboc QQ:9986584 * @website http://www.phpec.org */ header('Content-Type:text/html;charset=utf-8'); $savepath = 'F:/lastedit/'; if(isset...