`
收藏列表
标题 标签 来源
golang的html/template go, template, html, range
// golang html/template http://blog.csdn.net/rufidmx/article/details/8644895
        t, err := template.ParseFiles("tmpl.html")  
        err = t.Execute(w, onlineUser)  // 其中onlineUser包含tmpl.html使用的User;w是HandleFunc参数w http.ResponseWriter
// tmpl.html
        <form action="/test" method="POST">  
                {{with .User}}  
                    {{range .}}  
                        <input type="radio" name="test" value={{.Name}}/>{{.Name}}<br/>  
                    {{end}}  
                {{end}}  
                <input type="submit" value="submit"/>  
        </form>  
浏览器父子标签页通信js 标签页, 通信
<!-- 父标签页 -->
  <script type="text/javascript">
  function onCloseB() {
    console.log("onCloseB");
    $('#myp').text('this is result');
  }
  </script>
  <a href="index.html" class="btn" target="_BLANK">子标签页</a>
  <p id="myp" class="text-left">hello world</p>

<!-- 子标签页:执行window.opener.onCloseB()。结果:父标签页的hello world变成this is result -->
通过iframe对html静态引用/复用 html, iframe, 复用, 引用
<iframe src="index.html" width="100%" height="500" frameborder="0" scrolling="no"></iframe>
Global site tag (gtag.js) - Google Analytics