View Mode: Normal | Article List
Category: HTML/CSS | < | 1 | 2 |

textarea 限制字符

[ 2006-04-18 19:29:27 | Author: zhenhua ]
<textarea name="A" cols="45" rows="2" onKeyDown='if (this.value.length>=20){event.returnValue=false}'>123</textarea>

CSS小技巧

[ 2004-09-09 00:45:21 | Author: zhenhua ]
<style>
.db tr{
background-color:expression('#eeeeee,#eeeeee,#eeeeee,#cccccc,#cccccc,#cccccc'.split(',')[rowIndex%6]);
}
</style>
<table width="500" border="1" class="db">
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>

只能输入数字

[ 2004-09-09 00:38:24 | Author: zhenhua ]
<input onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
---------------------------------------------------------------

<input name=txt1 onchange="if(/\D/.test(this.value)){alert('只能输入数字');this.value='';}">
---------------------------------------------------------------

<input onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')">

媒体代码

[ 2004-09-09 00:35:53 | Author: zhenhua ]
1.rm格式
<OBJECT ID=video1 CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" HEIGHT=288 WIDTH=352>

<param name="_ExtentX" value="9313">
<param name="_ExtentY" value="7620">
<param name="AUTOSTART" value="0">
<param name="SHUFFLE" value="0">
<param name="PREFETCH" value="0">
<param name="NOLABELS" value="0">
<param name="SRC" value="rtsp://203.207.131.35/vod/dawan-a.rm";>
<param name="CONTROLS" value="ImageWindow">
<param name="CONSOLE" value="Clip1">
<param name="LOOP" value="0">
...

Read More...

Html实现的转向

[ 2004-09-08 18:44:50 | Author: zhenhua ]
不隐藏转向之后的地址 代码一
------------------------------------------------------------------------------
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<title></title>
</head>
<body>
<form name=loading>
<P align=center><FONT face=Arial color=#0066ff size=2>loading...</FONT> <INPUT
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: bolder; PADDING-BOTTOM: 0px; COLOR: #0066ff; BORDER-TOP-style: none;
...

Read More...

英文/数字/标点自动换行

[ 2004-09-08 18:44:08 | Author: zhenhua ]
表格对英文数字和标点的强制换行
1,固定表格
<table style="layout:fixed;width:600">


2,字符换行
td里面添加
style="word-break:break-all;word-wrap:break-word"

META标签使用详解

[ 2004-09-08 18:38:49 | Author: zhenhua ]
META标签,是HTML语言head区的一个辅助性标签。在几乎所有的page里,我们都可以看到类似下面这段html代码:
-------------------------------------------------------------------------
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
-------------------------------------------------------------------------

这就是meta标签的典型运用。meta标签有多少参数,有什么作用,为什么我们要特别重视它呢?让我们一起来发掘meta标签的奥妙!

根据HTML语言标准注释:meta标签是对网站发展非常重要的标签,它可以用于鉴别作者,设定页面格式,标注内容提要和关键字,以及刷新页面等等。

meta标签分两大部分:HTTP-EQUIV和NAME变量。

HTTP-EQUIV类似于HTTP的头部协议,它回应给浏览器一些有用的信息,以帮助正确和精确地显示网页内容。
...

Read More...

窗口控制代码

[ 2004-09-08 18:29:36 | Author: zhenhua ]
<!--最小化-->
<OBJECT id="min" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-

00aa003b7a11">
<PARAM name="Command" value="Minimize"></OBJECT>
<button onclick="min.Click()"><font face="webdings">0</font></button>

<!--最大化-->
<OBJECT id="max" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-

00aa003b7a11">
<PARAM name="Command" value="Maximize"></OBJECT>
<button onclick="max.Click()"><font face="webdings">1</font></button>

<!--关闭窗口-->
...

Read More...
< | 1 | 2 |