用JavaScript修改CSS属性
今天去baidu提问的时候看到baidu的css智能提示觉得很人化,这不回头就写了一个。给大家看看!
请多多指教!!!
HTML code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>
exmpall
</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<STYLE type="text/css">
div{
padding: 0;
margin: 0;
position: absolute;
left:200px; /*左边*/
top:0; /*上面*/
display: none;
width: 180px;
height: 150px;
border-style: solid;
border-color: #E6C963;
border-width: thin;
}
</STYLE>
<SCRIPT TYPE="text/javascript">
<!--
function myfunction1()
{
var my=document.getElementById("chenyi");
my.style.position = "absolute";
my.style.top = "50px"; /*上面*/
my.style.display = "inline";
my.style.backgroundColor = "#E4A17C";
}
function myfunction2()
{
var my=document.g
相关问答:
皮肤和样式表都可以设置控件的外观,具体有什么区别呢?
skin 是asp.net 体系的 就相当于<asp:TextBox> 对应于<input type="text">
你把皮肤当成衣服,把样式表当成化妆品就容易理解了
......
<html>
<head>
<title></title>
</head>
<body>
<font color="#0000FF"><b>请在文本框1中输入文字:</b>
<form>
<input ......
我的源文件如下:
<html>
<head> <title>show picture </title>
<script>
function change(fileName)
{
  ......
我也来一个趣味javascript:
打开以下html文件,依次按下G,L,C三个键,就会有奇迹出现!!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" ......