JavaScript实现水平选项卡效果
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication2._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<style>
#panel{
border:1px solid #0066CC;
height:400px;
width:786px;
position:relative;
}
#main{
position:relative;
top:32px;
left:0;
background:#FFFFCC;
height:300px;
}
.slide{
position:absolute;
left:1px;
top:1px;
display:none;
}
.show{
position:absolute;
left:1px;
top:1px;
display:block;
}
ul#menu {
color:#808080;
padding:0;
margin:0;
list-style:none;
font-family:"Courier New", Courier, monospace;
font-size:12px;
/*--------------------
解决 IE 不兼容问题
---------------------*/
position:absolute; !important
left:0;
top:0;
}
#menu li{
/*padding:14px 18px 14px 18px;*/
width:130px;
height:30px;
color:#444;
float:left;
border-top:1px solid #666666;
border-right:1px solid #666666;
border-bottom:1px solid #666666;
text-align:center;
line-height:30px;
margin:0;
padding:0;
}
/*
#menu li a{
background:#f8f8f8;
color:#808080;
text-decoration:none;
display:block;
width:130px;
height:30px;
}*/
#menu li a:hover{
color:#000;
background:#f8f8f8;
background-color:#CCCCCC
}
ul.news {
list-style:none;
margin:10px 20px;
}
.news li{
padding:4px;
}
.news li a:link, .news li a:visited{
text-decoration:none;
color:#993333;
display:block;
width:
相关文档:
中文编码:
function upload() {
var form = document.getElementById('topic');
if ($('uploadfile').value == "") {
alert("请选择文件!");
return;
}
$('uploadfile').value = escape($('uploadfile').value) ......
javascript的系统函数
1,encodeURI方法
返回对一个URI字符串编码中的结果,本质是UTF-8编码
eg:
var urlStr = encodeURI('http://fanli.qq.com/index.html?a=ddd&msg=中国');
alert(urlStr);
2, decodeUR ......
1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键
<table border oncontextmenu=return(false)><td>no</table> 可用于Table
2. <body onselectstart="return false"> 取消选取、防止复制
3. onpaste="return false" 不准粘贴
4. oncopy="return false;" oncut= ......
//各种尺寸
s += "\r\n网页可见区域宽:"+ document.body.clientWidth;
s += "\r\n网页可见区域高:"+ document.body.clientHeight;
s += "\r\n网页可见区域高:"+ document.body.offs ......