Off Topic > Off Topic
Programming Megathread
<< < (16/241) > >>
Akio:
I feel like I can look at a lot of coding languages and tell what's going on, but I can't do it myself. :(
Xealyth:

--- Quote from: Akio on October 29, 2015, 10:04:21 PM ---I feel like I can look at a lot of coding languages and tell what's going on, but I can't do it myself. :(

--- End quote ---
maybe if u weren't a tard :^)
Waru:

--- Quote from: Xealyth on October 29, 2015, 10:05:11 PM ---maybe if u weren't a tard :^)

--- End quote ---

confirmed he is tard

i dont understand how webpages function

most seem to use like 5 different languages and it's a cluserforget of fitting them together

even using straight python with html seems loving useless cause you cant do anything with it
Foxscotch:

--- Quote from: Waru on October 29, 2015, 10:23:10 PM ---i dont understand how webpages function
most seem to use like 5 different languages and it's a cluserforget of fitting them together

--- End quote ---
HTML: layout & content
CSS: style
JavaScript:........... .... changingness

take this:

<div>
    <p class="big-text">pls don't look at me</p><br>
    <button id="btn">Click here</button>
</div>

that's HTML (not exactly valid, but u know). all it does is stick the text "pls don't look at me" on a blank page, with a button labeled "Click here" on the next line
which is boring. so add CSS

.big-text {
    font-size: 100px;
}

now the text is big
but all it does is sit there, so it's time for JS

document.getElementById('btn').addEventListener('click', function () {
    var p = document.getElementsByTagName('p')[0];
    p.parentElement.removeChild(p);
});

now, when you click on the button, it'll remove the text! probably. I didn't test it

in the end the whole document should look like this

<!DOCTYPE html>
<html>
    <head>
        <style>
            .big-text {
                font-size: 100px;
            }
        </style>
    </head>
    <body>
        <p class="big-text">pls don't look at me</p><br>
        <button id="btn">Click here</button>
       
        <scrip>
            document.getElementById('btn').addEventListener('click', function () {
                var p = document.getElementsByTagName('p')[0];
                p.parentElement.removeChild(p);
            });
        </scrip>
    </body>
</html>

"script" is intentionally misspelled because cloudflare is irritating
(edit: switched to dark colors. looks much better)

idk why I keep making these big long posts
you should go learn it yourself
http://codecademy.com/
fireking:
you guys forgot malbolge

--- Code: ---('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&%$#"
`CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>
--- End code ---
Navigation
Message Index
Next page
Previous page

Go to full version