Hopes

Start Here..

 

文本框内显示文本提示,当点击后提示消失!

文本框内显示文本提示,当点击后提示消失!

实现代码:

[xhtml] view plain
copy

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>test</title>
<script type="text/javascript"><!--
var account_tip = "描述";
//鼠标进入文本时间
function init_value() {
var bs = document.getElementById("Txt_remark");
if (bs.value.length == 0 || bs.value == account_tip) {
bs.value = "";
}

}
//鼠标移出
function init_over() {
var bs = document.getElementById("Txt_remark");
if (bs.value.length == 0 || bs.value == account_tip) {
bs.value = account_tip;
}
}

// --></script>
</head>
<body>
<input ID="Txt_remark" value="描述" onfocus="init_value()" onblur="init_over()" />
</body>
</html>

posted on 2012-10-06 20:37 ** 阅读(724) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航:
 

导航

统计

公告

你好!

常用链接

留言簿(2)

随笔档案

文章分类

文章档案

新闻档案

相册

收藏夹

C#学习

友情链接

搜索

最新评论

阅读排行榜

评论排行榜