0
嗨我试图将焦点设置为选项卡时的选项卡。我遇到的问题是,当我在按钮的背景图像中添加焦点颜色时,图像周围没有显示,但如果我删除图像,按钮效果很好。当它具有焦点并将其重置为模糊时,如何在按钮周围放置边框?将焦点设置为选项卡上的按钮
<html>
<head>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('button:button').focus(function(){
$(this).css({'background-color' : 'red'});
});
$('button:button').blur(function(){
$(this).css({'background-color' : 'lightgreen'});
});
});
</script>
</head>
<body>
<button type='button' id='btnSubmit' style="background-image:
urlbuttonBackground.gif);" >button</button>
</body>
</html>
jQuery的1.3?这很古老。 – ThiefMaster