二月
13
2009
meta是用來在HTML文檔中模擬HTTP協議的響應頭報文。meta 標籤用於網頁的<head>與</head>中,meta 標籤的用處很多。meta的屬性有兩種:name和http-equiv。name屬性主要用於描述網頁,對應於content(網頁內容),以便於搜索引擎機器人查找、分類(目前幾乎所有的搜索引擎都使用網上機器人自動查找meta值來給網頁分類)。這其中最重要的是description(站點在搜索引擎上的描述)和keywords(分類關鍵詞),所以應該給每頁加一個meta值。比較常用的有以下幾個:
Continue Reading »
十二月
13
2006
<!-–防止使用右鍵,連 Firefox 都不行 start-–>
<script type=
"text/javascript">
function clickIE4
(){
if (event.
button==
2){
return false;
}//end if
}//end func
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
return false;
}//end if
}//end if
}//end func
function OnDeny(){
if(event.ctrlKey || event.keyCode==78 && event.ctrlKey || event.altKey || event.altKey && event.keyCode==115){
return false;
}//end if
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
document.onkeydown=OnDeny();
}else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
document.onkeydown=OnDeny();
}//end if
document.oncontextmenu=new Function("return false");
</script>
<!–-防止使用右鍵,連 Firefox 都不行 End-–>