Note that there are some explanatory texts on larger screens.

plurals
  1. PONot knowing how to position the output of Javascript in an HTML page
    primarykey
    data
    text
    <p>I am a javascript beginner . I am working on a wordsmith game that display's a clue (on the roll of a dice ) to a word . now i need to display the blank spaces of the word and a clue below it . I am not knowing hot to display the content to the place i want in the page ???</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; form1= document.forms[0]; function display() { words=new Array("Elephant","Tiger","Panther","Giraffe","Zebra","Anaconda"); phrases=new Array("Largest Land Mammal","Striped Animal moving towards Extinction","Found in the Amazon Jungle","Found in Africa","It helps us Cross","Very Dangerous Reptile"); count = words[i].length; while(count&gt;0) { document.write("__")//to display the word with blank spaces document.write(""); // space in between characters count--; } } function show_dice() { randomnumber=Math.floor(Math.random()*6); i=randomnumber; randomnumber = randomnumber + 1; document.getElementById("myButton1").value=randomnumber; document.getElementById("myButton1").disabled="disabled"; } &lt;/script&gt; &lt;link rel="stylesheet" type="text/css" href="keyboard.css"&gt; &lt;/head&gt; &lt;body&gt; &lt;form&gt; &lt;input type="button" id = "myButton1" name ="Button1" onclick="show_dice()" value="Click the Dice!!!"&gt; &lt;h1&gt;Enter Your Guess For the Word Below&lt;/h1&gt; &lt;h2&gt; Clue to the Word is :&lt;/h2&gt; &lt;input type="text" value="" class="keyboardInput"&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload