【发布时间】:2022-01-12 07:15:31
【问题描述】:
当我单击该按钮时我使用了两个按钮 应该使用 javascript 更改 div 替换功能问题是当我单击按钮时默认更改边框为黑色 我找不到添加的位置我正在添加屏幕截图。它发生在我添加点击替换功能
<script>
function replace(hide, show) {
document.getElementById(hide).style.display = "none";
document.getElementById(show).style.display = "block";
}
</script>
<div class="two_btn">
<div class="order_btn">
<button type="button" onclick="replace('div2','div1')">Order & Collect</button>
</div>
<div class="book_collection">
<button type="button" onclick="replace('div1','div2')">Book UK Collection</button>
</div>
</div>
【问题讨论】:
-
尝试按钮{outline:none}
-
@Minal Chauhan 不工作
-
请添加css代码...
-
@Minal Chauhan,完成了。我正在添加这种样式,我现在可以使用内联样式了
标签: javascript html css