MAth + conditions + Multiple Round + fractions
by niighthawk
HTML
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>untitled</title>
</head>
<body>
<input type="text" id="value1" value="168" size="5"/> MHz
<input type="submit" id="generic_search_button" value="X" onclick="output();">
<p id="resultinches"></p>
<p id="resultmm"></p>
<script type="text/javascript" language="javascript" charset="utf-8">
function output(){
var value1 = document.getElementById('value1').value;
document.getElementById('resultinches').innerHTML = ((1003-(3.5*parseInt(value1)))*0.03937008)+" inches";
}
</script>
<style>
#generic_search_button
{
width: 60px; /*new width*/
height: 25px; /*new width*/
border: none !important; /* no border and override any inline styles*/
margin-top: 7px;
cursor: pointer;
background-color: #C60;
background-image: url(/Images/search.png);
background-repeat: no-repeat;
background-position: center center;
}
</style>
</body>
</html>