Jump to content

LucasMars123

Members
  • Posts

    10
  • Joined

  • Last visited

About LucasMars123

  • Birthday May 22

LucasMars123's Achievements

Newbie

Newbie (1/7)

2

Reputation

  1. Thanks! That works perfectly! I this links me straight to the page I want!
  2. Can someone please give me some example code so I can link a webpage to another using javascript? This is my code at the moment:- document.onkeydown = function(e) { e = e || window.event; // because of Internet Explorer k = e.which || e.charCode || e.keyCode; // because of browser differences... if (k == 49 && !e.altKey && !e.ctrlKey && !e.shiftKey) { string.link(link.html) } else { return true; } return false; } This won't link me to the other link when "1" on the keyboard is pressed... Please Help!
  3. I could really use an answer soon...
  4. -- Nevermind, I posted twice!
  5. How about this:- <html><head><title>Title</title></head><body><style>div{width:111;height:237;background:#003366;}div:hover{background:#4D7094;}</style><div><p> </p></div></body></html>And Then Use http://www.w3schools.com/tags/ref_colorpicker.asp To Change The Colour
  6. How about, when you get the correct answer it will re-generate the answer if (a==x) { confirm("Gratz, you've entered the right number"); a=Math.floor((Math.random())*100+1);} [EDIT]Would that work? You are not wrong, but that is what I would do [/EDIT]
  7. <html> <head> <title> JS studing</title> </head> <body onload="start()"> <b><p id="show">Please enter a number between 1-100</p></b> <input id="test" type="number"> <button type="button" onclick="test1()">Submit</button> <p id="result"></p> <script> function start() { var n=Math.floor((Math.random())*100+1); var d=document.getElementById('test').value; } function test1() { if (n==d) { alert("Well Done! You Have Guessed The Number!") } else { alert("You Have Guessed The Wrong Number. "+d+" Is Not Correct.") } } </script> </body></html> Hopefully this helps.
  8. Instead of an editbox, would it work if it used a slider? [EDIT] Nevermind [/EDIT] [EDIT 2]It might take longer[/EDIT 2]
  9. I think I may have a solution... I will post the result in a minute.
  10. I am having problems using the "<canvas>" tag as I am using HTML code from your website. http://www.w3schools...tml5_canvas.asp - Canvas Coordinates. Now, I have a piece of code that I have to find the "<canvas>" tag to add. In the code, I found out that a div creates the canvas. But how would I add an image that bounces across the screen when the mouse is over the canvas. I already have the co-ordinates of the mouse and the image inserted. I have attached the .html file and an image a.png. This should create an object and show you the co-ordinates of the mouse when it is over the canvas. And when it is not, it does not show any co-ordinates and shows a heading of PAUSED.index.htmlMany Thanks,[EDIT] Please could someone reply and post some code for this problem. I am only new to HTML. There is Javascript in there but that was in the canvas code here:-http://www.w3schools.com/html/html5_canvas.asp [/EDIT]Additional:-This doen't work in Internet Explorer 10 - well it didn't when I tried.
×
×
  • Create New...