小手抄

 

2/6

<script language="JavaScript" type="text/JavaScript">

//双击鼠标滚动屏幕的代码

var currentpos,timer;

function initialize()

{

timer=setInterval ("scrollwindow ()",30);

}

function sc()

{

clearInterval(timer);

}

function scrollwindow()

{

currentpos=document.body.scrollTop;

window.scroll(0,++currentpos);

if (currentpos !=document.body.scrollTop)

sc();

}

document.onmousedown=sc

document.ondblclick=initialize

 

//更改字体大小

var status0='';

var curfontsize=10;

var curlineheight=18;

function fontZoomA(){

if(curfontsize>8){

document.getElementById('fontzoom').style.fontSize=(--curfontsize)+'pt';

document.getElementById('fontzoom').style.lineHeight=(--curlineheight)+'pt';

}

}

function fontZoomB(){

if(curfontsize<64){

document.getElementById('fontzoom').style.fontSize=(++curfontsize)+'pt';

document.getElementById('fontzoom').style.lineHeight=(++curlineheight)+'pt';

}

}

</script>

<body>

<table>

<tr>

<td>【字体:<A href="javascript:fontZoomA();">小</A>

                <A href="javascript:fontZoomB();">大</A>】

</td>

</tr>

<tr>

<td id=fontzoom>在这个里面放文字</td>

</tr>

</table>

</body>

2/20

把界面全屏化

<html xmlns="http://www.w3.org/1999/xhtml" >

<head id="Head1" runat="server">

<title>DIY</title>

<script language="javascript" type="text/javascript">

function OpenFullScreenWindow()

{

var w=screen.width-2; if (w>1100)w=1020

var h=screen.height-54; if (h>780) h=780

var win = window.open('Notify/NotifyLists.aspx','','top=0,left=0,width='+w+',height='+h+',scrollbars=yes');

if(win == null)

{

window.location = 'Notify/NotifyLists.aspx';

}

else

{

window.opener = null

window.close();

}

 

}

</script>

</head>

<body onload="OpenFullScreenWindow();">

<a onclick="javascript:OpenFullScreenWindow()" style="cursor: hand; text-decoration: underline;">点击此处访问系统</a>

</body>

</html>

 

在这个区域里面复制,剪切的内容都是DIY

<span onbeforecopy="event.returnValue=false;" onbeforecut="event.returnValue=false;" oncopy="event.returnValue=false;window.clipboardData.setData('Text','DIYDIY');" oncut="event.returnValue=false;window.clipboardData.setData('Text','DIYDIY');">

sdfgsdgsddgdgdfgfdsfsdfsdfdsfds

</span>

posted @ 2006-02-21 11:30  RicoRui  阅读(286)  评论(0编辑  收藏  举报