Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function convert() {
var x = document.getElementById("test1").value
document.getElementById("test").innerHTML = Math.abs(x);
}
</script>
</head>
<body>
<div id="test"></div></br>
<input type="text" id="test1" value="-5.62"></br>
<button type="button" onclick="convert()">convert</button>
</body>
</html>
The most helpful JAVASCRIPT solutions
How can I get the last day and the next day in javascript ?JAVASCRIPT Click to see more ... 5.8K 507