<style type="text/css">
<!--
body {background-color: black}
.font1 {font-family: tahoma; font-weight: bold; font-size: 10px; color: white;}
-->
</style>
<script type="text/javascript">
<!--
var question = "What would you like the title to be?";
function displayquestion(){
document.title = prompt(question);
}
// -->
</script>
<form>
<input type="button" value="Change Title"
onclick="displayquestion()">
</form>
<script type="text/javascript">
<!--
if (displayquestion() == "Random") {
document.write("<font class= font1 >Good choice.</font>");
}else{
document.write("<font class= font1 >Bad choice.</font>");
}
// -->
</script>
There are two problems (neither of which appear in the error console of Firefox). The prompt still appears on the page when you load it- even though it s in a function. Then- the if statement doesn t work right. It writes "Bad Choice" no matter what.
There was no more room left- so I couldn t provide any more information on the code.
When you load the page- all that should appear from the page from the start is the black background and the button. When you click the button- a prompt appears. Whatever you put in this prompt becomes the page title. If the page title you entered is the word Random- then text should appear "Good choice"- and if you type anything else- the text "Bad choice" should appear.
The two problems are that the prompt opens as soon as the page loads- before anything is clicked. It s only supposed to open upon clicking the button. The other problem was with the if-statement.
it says that i`ve got 1 un-read message in my inbox...but when i sign-in - it just gives me an Empty Screen and doesn`t get rid of the (1) after signing-out and ??????
i`m confused and is there a Problem? also says some-thing about JavaScript and Browser needing it...??? HELP
Could sombody make me a javascript code to do the following? It s not homework! I don t even know JavaScript- still learning from a book. Thanks.
I need it to when I clik on an image- it chages to another- for example- When I click one imageleft1red.png it changes imagerightblue.png to image2rightred.png- I hpe that that is clear enough- please- if you need to know somthing- hang around for a few and I ll add details to answer you.
Please include the HTML part of the code too! Thanks!
11 pts for the first person to give me the code!
Too complex- I wouldn t be able to make that work for me.
The eond one would be correct.
Clickthis image
originalimage------->Replacedwiththisimage
Try it out here in a bit.
sooooo- im trying to make a mouseover effect using HTML- in which when i roll over a piece of text- it displays sub-links under it- if its javascript- still answer me- and the more you explain the better!- 10 points on the first one i understand and use for my site
some thing like on this site:
http://www.freewebs.com/nis95/Info%20Table.htm
Hello- you either have JavaScript turned off or an old version of Adobe s Flash Player. Get the latest Flash player. But I installed Adobe twice. Still.
Why does it say ( Hello- you either have JavaScript turned off or an old version of Adobe s Flash Player. Get the latest Flash player) when I try to watch a video on YouTube. It didn t do it before. How can I fix this? First correct and easy answer will get an easy 10 points.
I tried going to the tool bar and it is under enable already. It still won t work. What elase can I try?
No comments:
Post a Comment