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