Jumat, 31 Juli 2015

Query di HTML

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

Tidak ada komentar:

Posting Komentar