<div id="box1" style="background-color: #cccccc; width: 100px;height: 100px;"></div>
<div id="btn" style="background-color: red; width: 50px;height: 50px;"></div>
<div id="box-text"></div>
const btn = document.querySelector("#btn");
const box1 = document.querySelector("#box1");
const boxText = document.querySelector("#box-text");
const boxBackground = box1.style.backgroundColor;
btn.addEventListener("click", function() {
boxText.innerHTML = `background-color: ${boxBackground}`;
})
$("#btn").click(function() {
$("#box-text").text("background-color: " + $("#box1").css("background-color"));
});