Sử dụng shorthand background để đặt color, image, position, repeat... trong một dòng.
Ví dụ
<!DOCTYPE html>
<html>
<body>
<button onclick="display()">Click để đặt background</button>
<script>
function display() {
document.body.style.background = "url('https://www.tutorialspoint.com/html5/images/html5-mini-logo.jpg') repeat right top";
}
</script>
</body>
</html>