Jump to content

dollar

Members
  • Content Count

    29
  • Joined

  • Last visited

Community Reputation

0 Neutral

About dollar

  • Rank
    Newbie
  1. I wanna create a page like below by coding (I'll fill out the data and add my own image later, I just need the rough template).My friend needs that for his exam. Could anyone please code it and give me?
  2. I've completed learning JS. Is it good to start learning jQuery now or after learning PHP & MySQL?
  3. <html><head><script type="text/javascript">function whichElement(e){var targ;if (!e) { var e=window.event; }if (e.target) { targ=e.target; }else if (e.srcElement) { targ=e.srcElement; }if (targ.nodeType==3) // defeat Safari bug { targ = targ.parentNode; }var tname;tname=targ.tagName;alert("You clicked on a " + tname + " element.");}</script></head><body onmousedown="whichElement(event)"><p>Click somewhere in the document. An alert box will alert the tag name of the element you clicked on.</p><h3>This is a header</h3><p>This is a paragraph</p><img border="0" src="ball16.gif" width="29" height="28" alt="Ball"></body></html>=====I'm not understanding what that highlighted code will do, could anyone please explain me that? I'm feeling little hard in understanding that...
  4. <html><body><script type="text/javascript">window.defaultStatus="This is the default text in the status bar!!";</script><p>Look at the text in the statusbar.</p></body></html> Tried the above code but I can't able to see anything changed in status bar. There's just "Done" text.Am I doing correct?
  5. I want to show image as a alert instead of usual text. Is there any way to do that?This is not working: <input type="button" onclick="alert(<img src='http://w3schools.com/images/h_logo.gif' />"value="Click me to get image">
  6. What that firstChild, nodeValue will do there? What they will tell to browser?======BTW, what's the difference between below two codes? I've noticed they both do same thing...
  7. dollar

    What's Node?

    What's node? I'm guessing we call html , body, p etc as nodes ..
  8. Thanks a lot Ingolme! BTW, I think we've to use two quotation mark here: document.getElementById("container").innerHTML = "<h1>Modified text</h1><p>This paragraph has different content</p> Like this:document.getElementById("container").innerHTML = "<h1>Modified text</h1><p>This paragraph has different content</p>"Am I correct?
  9. OK, got the some idea after seeing this.innerHTML will help when we want to write same thing again.like: document.write(txt) , it will write "Hello World". Correct me if I'm wrong.
  10. <html> <body> <p id="intro"> Hello World</p> <script type="text/javascript"> txt= document.getElementById("intro").innerHTML </script> </body> </html>What that "innnerHTML" will do there? I've tried by removing that and got same result.
  11. My friend had written names of kids in .txt file sent me.That .txt file contain names of all kids in a class. Like this : I want to copy/paste contents in that .txt file into another notepad , write any code and make like this: So is there any way to do that?Yeah I know we can do that manually or with simple HTML ordered list. But my problem is the list pretty big, so I need one short way..
  12. Let's say I've names of 26 kids. And I'm writing all names here :abcd...zSo, is there any way make them automatically start with numbers? Like this :1. a2. b3. c...26.z
  13. dollar

    [wip] My Site

    Hey Shade, how did you do that slider? I mean, the thing that is moving when I hover on Home,Gallery,Renders ..
  14. <html><body><script type="text/javascript">var mycars = new Array();mycars[0] = "Saab";mycars[1] = "Volvo";mycars[2] = "BMW";for (i=0;i<mycars.length;i++){document.write(mycars + "<br />");}</script></body></html>Could any please explain me what for statement will do there?BTW, How we should call all words inside that for (i=0;i<mycars.length;i++) ? Properties?
  15. Thank you Deirdre's Dad
×
×
  • Create New...