main.go
func thandle(rw http.ResponseWriter, req *http.Request) {
t, _ := template.ParseFiles("basic.html")//
t.Execute(rw, nil)
}
func main() {
http.HandleFunc("/", thandle)
http.ListenAndServe(":9999", nil)
}
I don't understand. Which part wrong?
basic.html
<head>
<script src="js/jquery-1.10.2.min.js"></script>
<script>
$(document).ready(function() {
alert('hey');
});</script>
</head>
if you can show me right code example?