go中web
田湖_怎么了
这个作者很懒,什么都没留下…
展开
-
go语言和web(1)
package mainimport( "fmt" "log" "net/http")func handler(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "欢迎━(*`∀´*)ノ亻!使用Go语言")}func main(){ http.HandleFunc("/", handler...原创 2018-12-29 15:14:18 · 109 阅读 · 0 评论 -
go中的web(3)
新建index.htnl文件<div> <form action="/out" method="POST"> <input name="username" value=""> <button>发送用户名</button> </f原创 2018-12-29 15:47:49 · 222 阅读 · 0 评论 -
go中web(2)
package mainimport ( "fmt" "html/template" "log" "net/http")func indexhandler(w http.ResponseWriter, r *http.Request) { t, error := template.ParseFiles("index.html&原创 2018-12-29 15:21:39 · 95 阅读 · 0 评论