Jump to content

ronald

Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ronald

  • Rank
    Newbie
  • Birthday 11/08/1981

Profile Information

  • Location
    Holland
  • Interests
    IT
    momentarily spending lots of time on W3schools, trying to learn html, css and hopefully all i need to know.
  1. ronald

    easy question

    new, was the magic word indeed. thanks!
  2. ronald

    easy question

    hello, i think i got it all right, but it wont log. ------------------------------------------------ function Person(name,age) { this.name = name; this.age = age; this.species = "Homo Sapiens"; } var sally = Person ("Sally Bowles",39); var holden = Person ("Holden Caulfield",16); console.log("sally's species is " + sally.species + " and she is " + sally.age); console.log("holden's species is " + holden.species + " and he is " + holden.age);
  3. ronald

    step zero js

    hello, i tried to build a very simple function, and i failed allready. dissapointing. I can not find where i went wrong. plz help me. button 1: it should change the wordt "haai" to "yoyo" and then to "hallo". it does change haai to yoyo, but not beyond. button 2: it should change color (it does, so works fine). regards, ronald <script> function hello() { var x = document.getElementById("hey"); if(x = "haai"){ var y = "yoyo"; }else{ var y = "hallo"; } document.getElementById("hey").innerHTML = y; } function red(){ document.getElementById("hey").style.color = "red"; } </script> <button onClick="hello()">click me</button> <button onClick="red()">click me</button> <p id="hey">haai</p>
  4. ah.....just found my own aswer i gues, its css, not html attributes. pfff, html/css is big, how do i ever find out and get in my head what belongs where, and when can i use what??
  5. hi there, i got a prob with finding refence for attributes. perhaps im not looking right, or missing things. i started looking for div attributes, finding on w3s this: - The <div> tag also supports the Global Attributes in HTML. - The <div> tag also supports the Event Attributes in HTML. i also checkt this site: http://www.w3.org/TR/html401/struct/global.html#edef-DIV at 7.5.4 there is it about the div now, i got this: (and it works just fine) <!doctype html> <html> <head> <title>my first website</title> <style type="text/css"> #myfirstdiv {border:2px solid red; width:100px; position:absolute; top:200px; left:100px;} </style> </head> <body> <div id="myfirstdiv">hello there!</div> </body> </html> i figure, this are examples of attributes: top, left, position, border, width (thats what i think at least..) but i dont see those above on the reference links. do i interpret something wrong? regards, R
×
×
  • Create New...