Course: Web Develpment (@Udacity)
Teacher: Steve Huffman (founder of Reddit), David Evans
第一单元:
1 介绍HTML编程基础(doctype,form,input等)。2 网络前端http协议交互的基础(get/post解析和比较)。
3 webapp框架上手,创建GAE、建立webapp的过程。
笔记:
central concept: web, html, url, http, webapp
<b> - bold (inline)
<em> - emphasis (inline)
<TAG ATTR="value">contents</TAG>
<a href="www.reddit.com">derp</a> - anchor
<img src="<url>" alt="description_text"> - image (inline)
<span class="foo">text</span> (block)
<div class="bar">text</div> (block)
<!DOCTYPE HTML>
<html>
<head>
<title> Title </title>
</head>
<body>
<b> content </b>
</body>
</html>
http://example.com/foo?name=value_of_name &q=1 #fragment
http://localhost:8000/
telnet www.udacity.com 80
GET / HTTP:/1.1
Host:www.udacity.com
<form action="http://www.google.com/search">
<input name="q">
<input type="submit">
</form>
这四行html保存为q.html文本,用浏览器打开。在编辑框中输入的字符在点击“submit”之后会提交给google进行搜索。
<form action="/test" method="post">
GET用途: in URL, fetch docs, max URL length limit, OK to cache, not change the server
POST用途: in body, update data, no max URL length, not OK to cache, change the server
<input type="text" name="q" value="default_value">
<input type="password" name="q" value="default_value">
<input type="checkbox" name="q" value="default_value">
<input type="radio" value="one">
<input type="radio" value="two">
<input type="radio" value="three">
<label>
One
<input ....>
</label>
<label>
Two
<input ....>
</label>
<label>
Three
<input ....>
</label>
<form action>
<select name="q">
<option>one</option>
<option value="2">two</option>
<option>three</option>
</select>
<input type="submit">
</form>
escape characters:
> | > |
< | < |
" | " |
& | & |
第二单元:
1 html网页编码(escape),将‘<’、‘>’转义等。
2 用户注册并登录的交互设计(html结合python编程格式化输出)。
3 网页重定向(redirect)。