原创 Jquery 獲取第一個子元素

<ul>      <li>John</li>     <li>Karl</li>     <li>Brandon</li> </ul> 獲取第一個元素:  $("ul li:first-child") <div id="getfi

原创 學習ejs的小知識

使用ejs的條件: 1。首先在使用ejs的時候記得安裝express-partials,不然不會默認引用layout.ejs 基本模版 2。還有在app.js中定義partials語句var partials=require('exp

原创 學習jade的小知識

網址爲http://naltatis.github.io/jade-syntax-docs/; 1. &lt爲 ”<”, &gt 爲”>” 2. 在寫input的value值引用數據時格式爲input(type=type, va

原创 webstrom 學習使用

1.顯示標籤頁的關閉按鈕:    preferences-->Editor>General>Editor Tabs>勾選 Show "close" button on editor tabs。 2.

原创 項目中獲取ip

方法1:    在代碼中加入“<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>”(一般加在html頁)   然後,在代碼中即可通過returnCitySN.cip取得