马克的足迹! html, javascript, css, php, python develop and design

23二/10

js调试函数

参考php的debug函数修改了一下JS版的。 firebug 下使用控制台 ie使用 alert弹出

/**
 * 内部调试
 **/
function debug(v){
    if(window.console && window.console.log){
        window.console.log(v);
    }else{
        alert(v);
    }
}
标签: , 1个评论
28一/10

代替远程桌面连接的软件

visionapp Remote Desktop

下载地址
下载

21一/10

【全球号召】拯救MySQL!

作为MySQL的多年忠实用户,并且个人也非常喜欢MySQL,看到了MySQL创始人发出的号召,毫不犹豫的

参加了签名活动,希望大家也能参加!(希望大家转发此文,共同参与)

马上参加“拯救MySQL”签名活动!

MySQL 创始人请求帮助邮件:http://www.cnbeta.com/articles/102517.htm

国内媒体报道:http://tech.sina.com.cn/it/2010-01-04/21153736195.shtml

7一/10

改变系统hosts的软件(PYTHON写的)

做前端,测试,程序开发需要不停的转换系统hosts文件。
用批处理与EDIT在集成测试时比较麻烦,所以写下这个软件

FOR XP
改变系统hosts工具-XP
FOR WIN7
改变系统hosts工具-windows7

其他平台没有试过。
使用 python2.5 + wxpython2.8 + py2exe
功能比较简单。

3十二/09

回车关闭弹出层

//按回车关闭按钮事件
//需要在页面的body加个事件


  function key_layer_close_v31(e){
        var isie = (document.all) ? true : false;
        var key = isie ? window.event.keyCode : e.which ;
        if(key==13){
	    if(document.getElementById('phishing').style.display=='block' && document.getElementById('read_complete').disabled == false ){
		UED.layer31.close();
	    }
	}
	return false;
  }
24十一/09

清除IE6在HTTPS安全提示问题

1. 检查所有的iframe中是否有为空的或者引用其他地方(如果有为空的,需要设计为 JAVASCRIPT:FALSE)
2. 不能引用外部的HTTP相关内容(可以使用HTTPS引用,图片样式与脚本)

10十/09

访问GOOGLE相册

1. win+r
notepad.exe C:\WINDOWS\system32\drivers\etc\hosts
2. 增加
203.208.39.99 lh1.ggpht.com lh2.ggpht.com lh3.ggpht.com lh4.ggpht.com lh5.ggpht.com lh6.ggpht.com lh7.ggpht.com
203.208.39.99 lh8.ggpht.com

重启浏览器

10十/09

同事提供的题目(Taobao)

alert(toRGB("#0000FF"));     //返回rgb(0,0,255)
alert(toRGB("#00F"));     //返回rgb(0,0,255)
alert(toRGB("#FF0000"));     //返回rgb(255,0,0)
alert(toRGB("taobao"));     //返回rgb(taobao)
alert(toRGB("#G00"));     //返回rgb(#G00)

function toRGB(color){

    //第有一字符有#号
    if(color.indexOf('#')==0){

        //判断长度
        if(color.length==4){
            //取出字母
            r = color.match(/([\da-z])/ig);
        }else{
            //取出字母
            r = color.match(/([\da-z]{2})/ig);
        }
        //返回
        return 'rgb('+formatHEX(r) +')';
    }else{
        return 'rgb('+color+')';
    }
}
//转化色彩数组转为10进制
function formatHEX(x){

    var html=[];
    for(i in x){
        html[i] = parseInt(x[i], 16);
        if(isNaN(html[i])){
            return '#'+x.join('');
        }
    }
    return html.join(',');
}
28九/09

window server2008 开启无线支持

1. start -> administrarot tools -> server manager
2. 选中左边中的 features -> 右边增加 ad features
3. wireless lan service -> installl

21九/09

sqliteadmin非常好的sqlite3客户端

开源免费, 还很好用, 最重要的还有中文!
http://download.orbmu2k.de/files/sqliteadmin.zip
没有理由不用啊.

   下一页