Craig Hopson Posted December 1, 2012 Share Posted December 1, 2012 (edited) hi guys can someone tell me where im going wrong please <!DOCTYPE html><html><head><script>function test() { alert(menu1.value);}</script></head><body><select name="menu" onchange="test(menu.value);"> <option value="1">1</option> <option value="5">5</option> <option value="10">10</option></select></body></html> Edited December 1, 2012 by Craig Hopson Link to comment Share on other sites More sharing options...
dsonesuk Posted December 1, 2012 Share Posted December 1, 2012 <!DOCTYPE html><html><head><script>function test(optvalue) { alert(optvalue);}</script></head><body><select name="menu" onchange="test(this.value);"> <option value="1">1</option> <option value="5">5</option> <option value="10">10</option></select></body></html> 1 Link to comment Share on other sites More sharing options...
Craig Hopson Posted December 1, 2012 Author Share Posted December 1, 2012 thanks easy when i look at it but i'm learning thanks for the quick response Link to comment Share on other sites More sharing options...
Craig Hopson Posted December 1, 2012 Author Share Posted December 1, 2012 (edited) can this be done? <!DOCTYPE html><html><head><script>var seconds = 1000; function test(optvalue) { var seconds = optvalue; alert(optvalue); } window.setInterval(function(){ var d=new Date();document.getElementById("output").innerHTML = d; }, seconds);</script></head><body><select name="menu" onchange="test(this.value);"> <option value="1">1</option> <option value="5">5</option> <option value="10">10</option></select><div id="output"></div></body></html> Edited December 1, 2012 by Craig Hopson Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now