HTML+CSS:
<input type="button" class="check" /><input type="text" class="text" style="display:none;" />
jQuery:
$(function(){$("check")click(function(){
$("text")show();
})
})
这个不行吗?这还不够详细啊?那还怎么详细?我总不能把你的网页都给你写了吧?再说我也不知道你的网页长什么样啊。
BufferedWriter bw = null;
OutputStreamWriter osw = null;
String headStr = "attachment; filename=\"" + fileName + "\"";
responsesetContentType("APPLICATION/OCTET-STREAM");
responsesetHeader("Content-Disposition", headStr);
osw = new OutputStreamWriter(outs, "GB2312");
bw = new BufferedWriter(osw);首先根据需求我们需要一个按钮,一个d出窗口层;
OK,废话不多说;
按钮就用一个基本的:
<button class="btn">Click me</button>
<div class="dialog">我是浮动的窗口</div>
我们要给浮动层设置一下样式
dialog{width:200px;height:200px;border:solid 1px #000;position:absolute;right:10px;top:100px; line-height:200px;text-align:center;display:none}
OK ,下面就是JS部分:
首先需要引入一个JS库,版本自己定义:
然后给按钮添加相应的点击事件,让点击button的时候,显示出浮动层
$("btn")click(function(){
$("dialog")show(100)
})<script type="text/javascript">
(function(a){
afnhoverClass=function(b){
var a=this;
aeach(function(c){
aeq(c)hover(function(){
$(this)addClass(b)
},function(){
$(this)removeClass(b)
})
});
return a
};
})(jQuery);
$(function(){
$("#navbox")hoverClass("current");
});
</script>
<style type="text/css">
{margin:0;padding:0;list-style-type:none;}
a,img{border:0;}
a{color:#333;text-decoration:none;}
a:hover{color:#3366cc;text-decoration:underline;}
body{font:12px/180% "宋体";}
/ menu /
menu{height:26px;width:110px;margin:20px auto;background:#fff;position:relative;}
menu a{display:block;height:24px;line-height:24px;padding:0 0 0 10px;border:solid 1px #ddd;}
menu atit{background:url(images/arrowgif) no-repeat;background-position:94px 9px;}
#navboxcurrent atit{background-position:94px -15px;color:#3366cc;font-weight:800;border-bottom:solid 1px #fff;position:relative;z-index:9;}
menu subnav{display:none;background:#fff;position:absolute;top:25px;left:0px;width:140px;border-style:solid;border-color:#ddd;border-width:1px;}
#navboxcurrent subnav{display:block;}
menu subnav a{border:none;}
menu subnav a:hover{background:#eee;border-left:solid 1px #fff;border-right:solid 1px #fff;font-weight:800;}
</style>
<div id="navbox" class="menu">
<a class="tit" href="#">jquery特效</a>
<ul class="subnav">
<li><a href="><input type="button" value="下载" onclick="windowdocumentexecCommand('SaveAs')">
仅限IE
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)