Html : 点击按钮弹出输入框,再次点击进行隐藏
上代码:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>点击按钮弹出输入框</title>
<style>
p{ margin:0; padding:0;}
.login-put {
clear: both;
line-height: 36px;
margin-bottom: 20px;
overflow: hidden;
width: 500px;
}
.login-put label {
color: #8c8686;
float: left;
font-size: 14px;
height: 36px;
line-height: 36px;
text-align: right;
width: 120px;
}
#form1{ float:left; width:320px}
#form1 label {
float: left;
text-align: left;
width: 80px;
}
input {
cursor: pointer;
vertical-align: middle;
}
.login-put #div1 {
padding-left: 120px;
}
.login-put #div1 input {
border: 1px solid #dddddd;
color: #999999;
float: left;
height: 36px;
line-height: 36px;
margin-right: 10px;
padding: 0 5px;
width: 190px;
}
</style>
</head>
<body>
<div class="login-put"><label>点击:</label>
<form id="form1" name="form1" method="post" action="">
<p>
<label>
<script type="text/javascript">
function show()
{
var value = document.getElementById("div1").style.display;
if(value=="none")
{
document.getElementById("div1").style.display="block";
}
else
document.getElementById("div1").style.display="none";
}
</script>
<input type="button" value="我是按钮" onClick="show()"/>
<div id="div1" style="display:none">
<input class="text01" name="" type="text" />
</div>
</div>
</body>
</html>
效果:

END
Html : 点击按钮弹出输入框,再次点击进行隐藏的更多相关文章
- JavaScript实现点击按钮弹出输入框,点确定后添加li组件到ul组件里
JavaScript实现点击按钮弹出输入框,点确定后添加li组件到ul组件里 <!doctype html> <html manifest="lab4.manifest&q ...
- jquery实现点击按钮弹出层和点击空白处隐藏层
昨天做项目遇到一个问题,和大家分享下,jquery实现点击按钮弹出层和点击空白处隐藏层的问题 if($('.autoBtn').length){ $('.autoBtn' ...
- ExtJs 4.2.1 点击按钮弹出表单的窗口
初学ExtJs,做项目的时候想做一个这样的效果:点击按钮弹出对话框,之前一直是使用EasyUi来做的, EasyUi里有Dialog,用起来很方便,但是现在转移到ExtJs上后,发现没有Dialog这 ...
- 请写出一段JavaScript代码,要求页面有一个按钮,点击按钮弹出确认框。程序可以判断出用
请写出一段JavaScript代码,要求页面有一个按钮,点击按钮弹出确认框.程序可以判断出用 户点击的是“确认”还是“取消”. 解答: <HTML> <HEAD> <TI ...
- jquery点击按钮弹出图片
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- 点击按钮弹出一个div层
JQuery弹出层,点击按钮后弹出遮罩层,还有关闭按钮 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml& ...
- ASP.NET点击按钮弹出确认对话框方法
开发asp.net网页应用程序的时候,有些页面的按钮需要增加一个确认对话框,比如: 实现这个功能比较简单,代码这样写: Button.Attributes["onclick"] = ...
- Asp.net点击按钮弹出文件夹选择框的实现(网页)
本文地址:http://www.cnblogs.com/PiaoMiaoGongZi/p/4092112.html 在Asp.net网站实际的开发中,比如:需要实现点击一个类似于FileUpload的 ...
- 点击datagrid弹出ldhdialog,点击弹出框的按钮,关闭且刷新datagrid
datagrid里的js这么写 //点击添加按钮触发 function superadd(title,addurl,gname,width,height) { gridname=gname; crea ...
随机推荐
- 页面布局常用,让子级div排排坐
画页面的时候经常遇到页面布局的问题,父级div包裹多个子div很常见,代码如下: <div> <div style='width:100px;height: 100px;backgr ...
- C语言变参函数的实现原理
1. 变参函数简单示例 #include <stdarg.h> #include <stdio.h> int Accumlate(int nr, ...) { ; ; va_l ...
- java中所有开源注解收集
@resource: resource全名为@Resource ,用来激活一个命名资源(namedresource)的依赖注入,在JavaEE应用程序中,该注解被典型地转换为绑定于JNDI conte ...
- T-SQL 聚合函数Count与NULL
大家都知道聚合函数是做统计用的,而count函数是统计行数的,也就是满足一定条件记录的行数. 下面我们来看下这个count与NULL的微妙关系. CREATE TABLE dbo.Student ( ...
- SpringMVC中RequetContextListener
来自:https://www.cnblogs.com/softidea/p/7068196.html 零.引言 RequetContextListener从名字结尾Listener来看就知道属于监听器 ...
- shell查看内存
<1>jps<2>ps<3>free<4>df<5>top jps: 很多Java命令都在jdk的JAVA_HOME/bin/目录下面,jp ...
- [转]jQuery AJAX pagination plugin with ASP.NET Server Side
本文转自:http://do-web.com/jpaging/usage How does it work? 1. In order to implement the plugin, you need ...
- IntelliJ IDEA里找不到javax.servlet的jar包
此处有小坑,请注意: https://mvnrepository.com网站查询到的servlet的包的格式为: provided group: 'javax.servlet', name: 'jav ...
- jade 入门
推荐网站: jade官网 html在线转换为jade 参考文章1 参考文章2 node的模板常用的有两个,一个是ejs,另外一个就是jade,相对来说,ejs更容易理解,像原生的html,很多 ...
- 《nginx 四》双机主从热备
lvs+keepalived+nginx实现高性能负载均衡集群 LVS作用 LVS是一个开源的软件,可以实现传输层四层负载均衡.LVS是Linux Virtual Server的缩写,意思是Linux ...