77家的会客2010

今天工作郁闷,贴一些恶心人的代码吧
Weather:雾 ,南风 4-5级 ,最低气温22 ℃

这段代码对于任何浏览器都不让点右键,够恶心吧???

<script type="text/javascript">
<!--
 
if (window.Event) 
  document.captureEvents(Event.MOUSEUP); 
 
function nocontextmenu() 
{
event.cancelBubble = true
event.returnValue = false;
 
return false;
}
 
function norightclick(e) 
{
if (window.Event) 
{
  if (e.which == 2 || e.which == 3)
   return false;
}
else
  if (event.button == 2 || event.button == 3)
  {
   event.cancelBubble = true
   event.returnValue = false;
   return false;
  }
 
}
 
document.oncontextmenu = nocontextmenu;  // for IE5+
document.onmousedown = norightclick;  // for all others
//-->
</script>

这一段比上一段好一些,没那么恶心,我说其恶心是因为我觉得显示日期在网页上就是个鸡肋,哪台电脑上没有日期显示???

<script type="text/javascript">
 today=new Date();
 function initArray(){
   this.length=initArray.arguments.length
   for(var i=0;i<this.length;i++)
   this[i+1]=initArray.arguments[i]  }
   var d=new initArray(
     "星期日",
     "星期一",
     "星期二",
     "星期三",
     "星期四",
     "星期五",
     "星期六");
document.write(
     "<font  style='font-size:9pt;font-family: 宋体'> ",
     today.getYear(),"年",
     today.getMonth()+1,"月",
     today.getDate(),"日   ",
     d[today.getDay()+1],
     "</font>" );
</script>

这一段似乎就有点用了哦。。。只是有个同等功能的比他要短不少,所以也来恶心一下吧

<script type="text/javascript">
function img_auto_size(oldimg){
 var newimg = new Image();
 newimg.src = oldimg.src;
 if (newimg.width > 0 && newimg.height > 0) {
  if (newimg.width > 600){
   oldimg.width = 600;
   oldimg.height = (newimg.height * 600) / newimg.width;
   oldimg.onmouseover = function() {
    this.style.cursor= "hand";
   };
   oldimg.onmouseout = function() {
    this.style.cursor="";
   };
   oldimg.onclick = function() {
    window.open(this.src, '_blank');
   };
  } else {
   oldimg.width = newimg.width;
   oldimg.height = newimg.height;
  }
  oldimg.alt = "Click to view in original size " + newimg.width + " x " + newimg.height;
 }
}
</script>

这些函数都是干什么用的,以及怎么用的,就表问我了,我恶心够了…………

[今天工作郁闷,贴一些恶心人的代码吧]的回复

匿了 于 2005-07-15 17:32:38 发表 | IP:218.201.9.*

我最讨厌不让老子点右键另存为了!!

一起来恶心,虽然不晓得你娃儿在说啥子

还有快去我的窝窝看劈腿的正确含义

 

匿了 于 2005-07-15 17:33:35 发表 | IP:218.201.9.*
朗个发了愣个多也
柠檬园主 于 2005-07-15 18:17:31 发表 | IP:210.83.202.*
幺妹儿,干撒子点那么多下哦,点一下子就行了三~~
4#   bencen 于 2005-08-05 08:25:18 发表 | IP:218.107.200.*
(故意下)老大,这是干什么用的啊 ̄ ̄ ̄ ̄ ̄ ̄
5#   柠檬园主 于 2005-08-05 09:06:43 发表 | IP:210.83.202.*
给你一砖头...
Post a Comment~