HTML特效--备忘

luozhangwen 2011-01-05 11:00:15
1. 带滚动条的DIV.html

<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>
...全文
58 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
yyy521fyy 2011-01-05
  • 打赏
  • 举报
回复
留名,保存。
luozhangwen 2011-01-05
  • 打赏
  • 举报
回复
打开没有工具栏的子窗体.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>
luozhangwen 2011-01-05
  • 打赏
  • 举报
回复
获得JS时间格式化,保存网页指定内容.htm

<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>
luozhangwen 2011-01-05
  • 打赏
  • 举报
回复
可拖动table.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>

23,407

社区成员

发帖
与我相关
我的任务
社区描述
Java 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧