Ajax using span
Calculate item prices when discounted for members 10%
The price of goods at discounted : .....
<html>
<head>
<title>Demo</title>
<script language="javascript">
function member(){
document.getElementById("cost").innerHTML=(document.getElementById("value").value-(document.getElementById("value").value*10/100));
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
</head>
<body>
<p align="center"><b>Calculate item prices when discounted for members 10%</b></p>
<form name="form1" id="form1">
<p align="center">
Type the full price of the item :
<input type="text" name="value" id="value"/>
<input type="button" name="button" id="button" value="Enter" onClick="member()"/>
</p>
</form>
<p align="center">The price of goods at discounted : <span id=cost>.....</span></p>
</body>
</html>
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment