Issue
I want to use   inside of my script :
<div class="badge-danger" id="current_date">
<script>
function CurrentDate() {
let current = new Date();
let cDate = current.getDate() + ' - ' + (current.getMonth() + 1) + ' - ' + current.getFullYear();
let cTime = current.getHours() + ":" + current.getMinutes() + ":" + current.getSeconds();
let dateTime = cDate + ' ' + cTime;
document.getElementById("current_date").innerHTML = dateTime;
}
setInterval(CurrentDate, 1000);
</script>
</div>
I don't know where to do it inside of this div I'm used to do it like this :
<span style="font-weight: bold"> Flash News</span>
Any Idea ?
Solution
You can use the html code in your string as it goes to innerHTML
anyway. So for example let dateTime = cDate + ' ' + cTime;
works
Answered By - IT goldman