this is part of my code:
Degree:
<script>
function F2(){
var y = document.getElementById("dd");
if (y>=73){
window.alert("Your degree is less then required");
}
}
</script>
it's in a form, i hope someone help me in my code.
You forgot to add .value at "y" initialization so you are assigning not value of input field, but the whole field
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
</head>
<body>
<button onclick="F2();">Button</button>
<input id="dd">
</body>
<script>
function F2()
{
var y = document.getElementById("dd").value;
if (y >= 73)
{
window.alert("Your degree is less then required");
}
}
</script>
</html>