Answers for "add custom values in html tag'"

6

add custom values in html tag

<p username="Grepper" id="element"></p>
<script>
	Username = document.getElementById("element").getAttribute("username")
	console.log(Username) // "Grepper"
</script>
Posted by: Guest on October-03-2021

Browse Popular Code Answers by Language