60 429
Assignments Done
98,1%
Successfully Done
In April 2018

Answer to Question #44652 in Other Programming & Computer Science for victor

Question #44652
The program will ask for a number. Then will display the odd numbers on that number in javascriptv
Expert's answer
<html>
<head>
</head>
 
<input type="text"id="test" name="test"value="" size="37">
  <input type="button"value="Button"  onclick="onclickButton()">
 
<script language="JavaScript">
 
function onclickButton() {
varstr="";
for(var i=0; i<test.value; i++)
{
if(i%2!=0)
{
  str+=i+",";
}
}
alert(str);
  }
 
</script>
 
<body>
</body>
</html>
 
 

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Assignment Expert
08.08.14, 16:46

Dear victor,
Please provide us with errors log.
Thank you.

victor
07.08.14, 14:03

the program is not working

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions