本文介绍了按下按钮后,在按钮周围添加粗矩形边框.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对话框中有许多按钮.按下按钮后在其周围添加粗矩形边框,再次按下按钮后隐藏粗矩形边框.在按下许多按钮之后,所按下的按钮为粗矩形边框,直到再次按下它们为止.
该怎么做?
谢谢.
There are many buttons in a dialog. Add thick rectangle border around the button after it is pressed and hide thick rectangle border after the button is pressed again. After I pressed many buttons ,the buttons that is pressed are of thick rectangle border until I pressed them again.
How to do this ?
Thank you.
推荐答案
<!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>
<title>Buttons</title>
<style type="text/css">
.buttons
{
padding: 5px;
margin: 10px;
}
.thick
{
border: 4px solid blue;
}
.thin
{
border: 1px solid black;
}
</style>
</head>
<body>
<input id="" type="button" value="Button 1" />
<input id="" type="button" value="Button 2" />
<input id="" type="button" value="Button 3" />
<input id="" type="button" value="Button 4" />
<script src="scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript">
//Add base classes to all buttons on page
jQuery(function(
这篇关于按下按钮后,在按钮周围添加粗矩形边框.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!