23,407
社区成员
![](https://csdnimg.cn/release/cmsfe/public/img/topic.427195d5.png)
![](https://csdnimg.cn/release/cmsfe/public/img/me.40a70ab0.png)
![](https://csdnimg.cn/release/cmsfe/public/img/task.87b52881.png)
![](https://csdnimg.cn/release/cmsfe/public/img/share-circle.3e0b7822.png)
<html>
<style>
.div_scrollbar {
overflow:auto;
scrollbar-face-color: #eeeeee;
scrollbar-highlight-color: #ffffff;
scrollbar-shadow-color: #f5f5f5;
scrollbar-arrow-color: #1a3b80;
scrollbar-track-color: #f5f5f5;
scrollbar-darkshadow-color: #bbbbbb;
scrollbar-base-color: #d5d5d5;
}
</style>
<body>
<div style="width:100px;overflow-x:hidden; height:100px;overflow-y:auto" class="div_scrollbar">
1234567890abcd a<br/>a<br/>a<br/>a<br/>a<br/>a<br/>a<br/>
</div>
</body>
</html>
<html>
<head>
</head>
<script>
function show()
{
var styl="height="+new String(screen.availHeight-28)+",top=0,left=0,width="+new String(screen.availWidth-10)+",location=no,menubar=no,toolbar=no,resizable=no,titlebar=no";
var result=window.open('open.html','',styl);
if (result!=null) {
result.focus();
window.opener=null;
window.close();
}
}
</script>
<body>
<input type="button" onclick ="show();" value="继续"/>
</body>
</html>
<html>
<script>
function saveText()
{
alert("会话记录"+getNowDate()+ ".htm");
var winSave = window.open();
winSave.document.open ("html","GBK");
winSave.document.write ("<html>哈哈</html>");
winSave.document.execCommand ("SaveAs",true,"会话记录"+getNowDate()+ ".html");
winSave.close();
}
function getNowDate() {
var dateObj = new Date();
var formatDate = "" + dateObj.getYear()+dateObj.getMonth()+dateObj.getDay()+dateObj.getHours()+dateObj.getMinutes()+dateObj.getSeconds();
return formatDate;
}
</script>
<body>
<button onclick="saveText();" value="save" >save</button>
</body>
</html>
<html>
<head>
</head>
<SCRIPT LANGUAGE="JavaScript">
var currentMoveObj = null; //当前拖动对象
var relLeft; //鼠标按下位置相对对象位置
var relTop;
function f_mdown(obj)
{
currentMoveObj = obj; //当对象被按下时,记录该对象
currentMoveObj.style.position = "absolute";
//alert(event.x);
relLeft = event.x - currentMoveObj.style.pixelLeft;
relTop = event.y - currentMoveObj.style.pixelTop;
}
window.document.onmouseup = function()
{
currentMoveObj = null; //当鼠标释放时同时释放拖动对象
}
function f_move(obj)
{
if(currentMoveObj != null)
{
currentMoveObj.style.pixelLeft=event.x-relLeft;
currentMoveObj.style.pixelTop=event.y-relTop;
}
}
</SCRIPT>
<BODY>
<TABLE width="100" border=1 onselectstart="return false" onmousedown="f_mdown(this)" onmousemove="f_move(this)">
<TR>
<TD bgcolor="#CCCCCC" align="center" style="cursor:move">title1</TD>
</TR>
<TR>
<TD align="center" height="60">content</TD>
</TR>
</TABLE>
</BODY>
</html>