论坛首页 Web前端技术论坛

jquery漂亮的按扭控件(源代码共享)

浏览 92516 次
该帖已经被评为良好帖
作者 正文
   发表时间:2009-07-17  
windedge 写道
貌似是同事
接头暗号: my? 我是dg的
你的validate也很好, 有空也共享一下


同事,你是东莞的?
有空再来整理些控件了。
0 请登录后投票
   发表时间:2009-07-17  
在标签里面加上了自定义属性,这个做法似乎不是很合适啊
0 请登录后投票
   发表时间:2009-07-17  

我用Firefox写了个<form action="url"></form>

在form里加入楼主给的代码,会出现:只要是按钮,就会向url发送form里有name属性的value.

代码如下:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>dayoDcc index</title>
<link rel="stylesheet" type="text/css" href="css/screen.css" />
<script type="text/javascript" src="js/jquery-1.3.min.js"></script>
<script type="text/javascript" src="js/button.js"></script>

</head>
<body>
<div align="center">
<div>
<center>
<h2>Dcc Auto Send System</h2>
</center>
</div>



<form >
<table   align="center" cellSpacing=0 cellPadding=0 width="90px">
	<thead>
	</thead>
	<tbody id="tbody" align="center">
		<tr>
			<td>Svn Url:</td>
			<td><input id="svnurl" name="svnurl" /></td>
		</tr>
		<tr id="changeTr">
			<td>custem:</td>
			<td><select id="custem">
				<option id="please">--请选择--</option>
			</select></td>
		</tr>

		<tr id="showcustemTr">
			<td>联系人:</td>
			<td id="showcustem"></td>
		</tr>
		<tr id="showCustemEamil">
			<td>your chance:</td>
			<td><textarea cols="19" rows="4" name="message"></textarea></td>
		</tr>
		<tr>
			<td>give message:</td>
			<td><textarea id="content" name="content" cols="19" rows="3"></textarea></td>
		</tr>
		<tr>
			<td><i>FTP信息:</i></td>
			<td><input id="ftp" /></td>
		</tr>
		
		<tr><td colspan="2"><input type="button" value="send"  id="send" icon="icon-save"/> <input
				type="reset" id="reset" value="reset" id="reset" icon="icon-reset"/></td><td></td>
		</tr>
	</tbody>
</table>
</form>

<div align="center"></div>
<h3 id="showsend"></h3>


</div>
</body>
</html>

 !注:两个.css在css/screen.css里import了

点击后url:http://127.0.0.1:8080/dayoDcc/?svnurl=&message=&content=

 

在IE里不会出现这个问题。   

不知道怎么解决,忘楼主给改改

0 请登录后投票
   发表时间:2009-07-19  
不错...很好用...移上去的时候好像会短了啊...
换成这样就好了..
.z-btn-over .z-btn-right{background:url(images/button/btnover_bg_right.gif) no-repeat -7px 0;}
0 请登录后投票
   发表时间:2009-07-19  
相当的不错,风格很像EXT
0 请登录后投票
   发表时间:2009-07-20  
bookcaicai 写道

我用Firefox写了个<form action="url"></form>

在form里加入楼主给的代码,会出现:只要是按钮,就会向url发送form里有name属性的value.

代码如下:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>dayoDcc index</title>
<link rel="stylesheet" type="text/css" href="css/screen.css" />
<script type="text/javascript" src="js/jquery-1.3.min.js"></script>
<script type="text/javascript" src="js/button.js"></script>

</head>
<body>
<div align="center">
<div>
<center>
<h2>Dcc Auto Send System</h2>
</center>
</div>



<form >
<table   align="center" cellSpacing=0 cellPadding=0 width="90px">
	<thead>
	</thead>
	<tbody id="tbody" align="center">
		<tr>
			<td>Svn Url:</td>
			<td><input id="svnurl" name="svnurl" /></td>
		</tr>
		<tr id="changeTr">
			<td>custem:</td>
			<td><select id="custem">
				<option id="please">--请选择--</option>
			</select></td>
		</tr>

		<tr id="showcustemTr">
			<td>联系人:</td>
			<td id="showcustem"></td>
		</tr>
		<tr id="showCustemEamil">
			<td>your chance:</td>
			<td><textarea cols="19" rows="4" name="message"></textarea></td>
		</tr>
		<tr>
			<td>give message:</td>
			<td><textarea id="content" name="content" cols="19" rows="3"></textarea></td>
		</tr>
		<tr>
			<td><i>FTP信息:</i></td>
			<td><input id="ftp" /></td>
		</tr>
		
		<tr><td colspan="2"><input type="button" value="send"  id="send" icon="icon-save"/> <input
				type="reset" id="reset" value="reset" id="reset" icon="icon-reset"/></td><td></td>
		</tr>
	</tbody>
</table>
</form>

<div align="center"></div>
<h3 id="showsend"></h3>


</div>
</body>
</html>

 !注:两个.css在css/screen.css里import了

点击后url:http://127.0.0.1:8080/dayoDcc/?svnurl=&message=&content=

 

在IE里不会出现这个问题。   

不知道怎么解决,忘楼主给改改


这是因为Firefox下 <button>标签会自动提交,可以在button的onclick中return false;或者下载我刚提交的新版button

0 请登录后投票
   发表时间:2009-07-23  
这个东西好好
0 请登录后投票
   发表时间:2009-07-24  
感谢lz,这个按钮很好用,但有个问题

button怎么比input高出了几个像素呢?还望lz解答一下。
  • 大小: 1.8 KB
0 请登录后投票
   发表时间:2009-07-25  
不想所有的Input都变成有图标的按钮啊。
0 请登录后投票
   发表时间:2009-07-25  
<!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">
用xhtml标准时好像显示按钮有问题。。鸡蛋中的骨头。嘿嘿。
0 请登录后投票
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics