我的博客 我的地盘
     在blog程序的数据库转换的时候遇到这些名词,在网上翻下来的

     这是一篇程序员写给程序员的趣味读物。所谓趣味是指可以比较轻松地了解一些原来不清楚的概念,增进知识,类似于打RPG游戏的升级。整理这篇文章的动机是两个问题

问题一:
使用Windows记事本的“另存为”,可以在GBK、Unicode、Unicode big endian和UTF-8这几种编码方式间相互转换。同样是txt文件,Windows是怎样识别编码方式的呢?

我很早前就发现Unicode、Unicode big endian和UTF-8编码的txt文件的开头会多出几个字节,分别是FF、FE(Unicode),FE、FF(Unicode big endian),EF、BB、BF(UTF-8)。但这些标记是基于什么标准呢?
代码1:
<script>
function selecturl(){
z=document.body.createTextRange();
z.moveToElementText(selecturlDiv);
z.select();
}
</script>
<span onmousemove='selecturl()' id=selecturlDiv><script>document.write(location.href)</script>


代码2:

【个人收藏】网页精华代码集

2006年12月6日 12:30 | by 猢狲
1. 将彻底屏蔽鼠标右键

oncontextmenu="window.event.returnvalue=false"  
<table border oncontextmenu=return(false)><td>no</table> 可用于Table

2. 取消选取、防止复制

<body onselectstart="return false">  

3. 不准粘贴

onpaste="return false"

4. 防止复制

oncopy="return false;" oncut="return false;"  
效果演示:
http://www.makewing.com/lanren/js/01/index.htm
http://www.makewing.com/lanren/js/02/index.htm
http://www.makewing.com/lanren/js/03/index.htm
http://www.makewing.com/lanren/js/04/index.htm
http://www.makewing.com/lanren/js/05/index.htm
http://www.makewing.com/lanren/js/06/index.htm
http://www.makewing.com/lanren/js/07/index.htm
http://www.makewing.com/lanren/js/08/index.htm
http://www.makewing.com/lanren/js/09/index.htm
http://www.makewing.com/lanren/js/10/index.htm
http://www.makewing.com/lanren/js/11/index.htm
http://www.makewing.com/lanren/js/12/index.htm
http://www.makewing.com/lanren/js/13/index.htm
http://www.makewing.com/lanren/js/14/index.htm
http://www.makewing.com/lanren/js/15/index.htm
http://www.makewing.com/lanren/js/16/index.htm
分页: 6/9 第一页 上页 1 2 3 4 5 6 7 8 9 下页 最后页 [ 显示模式: 摘要 | 列表 ]