@Ay__351_eFeb 22.2009 — # <br/> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=UTF-8" http-equiv="content-type"> <title></title> </head> <body> <input type="text" onblur="document.bgColor=this.value"> <br> </body> </html>
<br/> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=UTF-8" http-equiv="content-type"> <title></title>
<script type="text/javascript">
function Mitchman(x){ document.bgColor = x } </script> </head> <body> <input type="text" onblur="Mitchman(this.value)"> <br> </body> </html>
@Ay__351_eFeb 22.2009 — #When the button is clicked, the color change. <br/> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=UTF-8" http-equiv="content-type"> <title></title>
<script type="text/javascript">
function Mitchman(){ var el = document.getElementById("mycolor"); document.bgColor = el.value } </script> </head> <body> <input type="text" id="mycolor" > <input type="button" onclick="Mitchman()" > <br> </body> </html>
@MitchmanauthorFeb 22.2009 — #You did such a great job helping me with the last question maybe you could help me out with another on.
1. Have the user type in the first box a number to start counting from.
2. Have the user type in the second box a number where to stop counting to.
3. Have the user type in a number to step up/down by when counting.
* When the user presses the button this page will clear and the list of numbers will be displayed.
* If the user uses the same starting and ending number alert them that is not valid.
* The user can enter a starting number bigger than the ending number.
* Take into account that a user might enter a positive or negative step value
I got some of it to work using Prompts instead of text boxes. I have been working on this all day and I can't get it to work. I no I am asking a lot can you please help me!!!!! Thank You In advance.
@JMRKERFeb 23.2009 — #Only need to check for duplicate entries once, not each time in the loop <i> </i><script type="text/javascript"> x=parseInt(prompt("enter start","")); y=parseInt(prompt("enter end","")); if(x==y) { alert("The numbers are the same") } else { for(I=x;I<=y;I=I+1) { document.write(I+"<br/>"); } </script> </HEAD> <BODY>
@JMRKERFeb 23.2009 — #Oops ... you're right ... I typed too fast and didn't check. <i> </i> for(var I=x;I<=y;I=I+1) { document.write(I+"<br/>"); [COLOR="Magenta"]}[/COLOR]