<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){var mainVal = $("#h1").valueOf();alert(mainVal);})</script>
</head>
<body>
<h1 id="h1" value="0">hallow you </h1>
</body>
</html>
I am trying to use the val() method here. Any help would be awesome. Thank you.