Query di HTML

00.13

Hasil…

Kode:
doctype html
html
    head
        meta(charset="utf-8")
        script.
            get_query = function(variabel){
                query = window.location.search.substring(1)
                vars = query.split("&")
                for (i = 0; i < vars.length; i++){
                    pair = vars[i].split("=")
                    if (pair[0] == variabel){
                        return pair[1]
                    }
                }
            }
        script document.title = get_query("judul")
    body
        h1 Judul:
            script document.write(get_query("judul"))
        h1 Banyak:
            script document.write(get_query("banyak"))


Download aplikasi android Muhammad Zaini DI SINI

You Might Also Like

0 komentar

Back to top