屏蔽右鍵
<script type="text/Javascript">
document.oncontextmenu=eventfalse;
document.onselectstart=eventfalse;
function eventfalse()
{
window.event.returnValue=false;
}
</script>
--------------------------------------------------------------
//替換掉空格
function Trim(str)
{
var reg = /\s/;
str = str.replace(/ /g,"");
return str.replace(/ /g,"");
}
---------------------------------------------------------------
//定位滾動條位置
//*********form body scroll的定位*************
<SCRIPT type="text/Javascript"><!--
function onscroll()
{
document.all["pos"].value = document.body.scrollTop;
}
function OnlineformOnload()
{
OnloadForScroll();
}
function OnloadForScroll()
{
var spos = document.all["pos"].value;
window.scrollTo( 0, spos );
}
--></SCRIPT>
<body onscroll="onscroll();" onload="OnlineformOnload();">
<asp:TextBox id="pos" runat="server"></ASP:TextBox>
//*********div scroll的定位*************
<SCRIPT type="text/Javascript"><