Tuesday, February 22, 2011

Disable Right Click (Got Pop Out)

这个教学是给我朋友   黄忆瑾   的 ^^


封锁右键功能  而且  有弹窗的




Step :


Dashboard ---> Design/Layout --->  Add a Gadget ---> HTML/JavaScript


After that, copy down the code below and paste into HTML.




<script language="JavaScript">
<!--

//Disable right mouse click Script

var message="Function Disabled!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// -->
</script>








*  ATTENTION




you can change the  word been BOLD by me to the 


word you wanna show ^^ 

Monday, February 21, 2011

Ratings and Recommendations

Ratings and Recommendations  ^^

It's a function for your friends who visit your blog that can rate the page been written by you ^^


Just follow the step :




Dashboard --->  Design/ Layout ---> Add a Gadget ---> HTML/JavaScript


And copy down the code below and paste into HTML.

<script language="JavaScript">var OB_platformType =1;var OB_demoMode = false;var OB_langJS = "http://widgets.outbrain.com/lang_en.js";var OBITm = "1258618496588";</script><input value="IqHhzIyRei/uo5ny/hiWYQ==" name="OBKey" type="hidden" /> <script language="JavaScript" src="http://widgets.outbrain.com/OutbrainRater.js"> </script><script language="JavaScript">var OBCTm=1258618496588; </script><script language="JavaScript" src="http://widgets.outbrain.com/claim.js"> </script>






DONE !

计算访客停留的时间

计算访客停留的时间
这个教学是给我的朋友   黄忆瑾   的  ^^


Dashboard  --->  Design  ---> Add a Gadget ---> HTML/Java Script


After that  add the code below.   
                                          

      <form name="myform">
<input value="在线时间" name="clock" size="8" />
</form>
<script language="JavaScript">
var id, iM = 0, iS = 1;
start = new Date();
function go()
{
now = new Date();
time = (now.getTime() - start.getTime()) / 1000;
time = Math.floor( time);
iS = time % 60;
iM = Math.floor( time / 60);
if ( iS < 10)
document.myform.clock.value = " " + iM + " 分 0" + iS + " 秒";
else
document.myform.clock.value = " " + iM + " 分 " + iS + " 秒";
id = setTimeout( "go()", 1000);
}
go();</script>