在痞客邦文章要透過 CSS BLOCK 來顯示程式碼,需修改預設的 CSS 。
底下是修改方式:
[登入]/[管理後台]/[Visual Style]/[customize style]/[CSS Source Editing]
在預設的CSS,找到/*--------------------------footer*/這一行,在它上面加入下面的程式碼
mark528 發表在 痞客邦 留言(0) 人氣(387)
以前在網頁上要限制只能輸入數字都要 javascript 來輔助,查了一下網上的資料 html5 有提供 <input type="number"> 這簡便的方式來處理,BUT.....實驗之後,發現我又回去找以前的 javascript 來用了。
Input Type: number
The number type is used for input fields that should contain a numeric value.
Use the following attributes to specify restrictions:
max - specifies the maximum value allowed
min - specifies the minimum value allowed
step - specifies the legal number intervals
value - Specifies the default value
我用下面的 sample 試了一下
<!DOCTYPE html>
<html>
<body>
<form action="demo_form.aspx">
Quantity (between 1 and 5): <input type="number" name="quantity" min="1" max="5">
<input type="submit">
</form>
<p><b>Note:</b> type="number" is not supported in Internet Explorer 9 and earlier versions.</p>
</body>
</html>
當我輸入超過5或是其他英文字,一切如船過水無痕,什麼檢測都沒發生..........
mark528 發表在 痞客邦 留言(0) 人氣(42)
第一次看到網頁程式碼有這樣的東東,<meta name="robots" content="noindex, nofollow"> 完全不知道是作什麼用的,孤狗了一下,才知道原來是這麼一回事。
Robots META標籤
1、什麼是Robots META標籤
和其他的META標籤一樣,Robots META標籤也是放在頁面的中,專門用來告訴搜尋引擎ROBOTS如何抓取該頁的內容。
2、Robots META標籤的寫法:
Robots META標籤中沒有大小寫之分,name="Robots"表示所有的搜尋引擎;也可以針對某個具體搜尋引擎寫為name="googlebot"。
content部分有下列指令選項:none、noindex、nofollow、all、index和follow,指令間以 , 分隔。預設值為index, follow,只有inktomi除外,對於它,預設值是index, nofollow。
none
搜索引擎將忽略此網頁,等同於noindex,nofollow。
noindex
搜索引擎不索引此網頁。
nofollow
搜索引擎不繼續通過此網頁的鏈結索引搜索其他的網頁。
all
搜索引擎將索引此網頁與繼續通過此網頁的鏈結索引,等同於index,follow。
index
搜索引擎索引此網頁。
follow
搜索引擎繼續通過此網頁的鏈結索引搜索其他的網頁。
要注意的是:Robots META標籤限制搜尋引擎機器人抓取站點內容的辦法只是一種規則,需要搜尋引擎機器人的配合才行,並不是每個ROBOTS都遵守的。
mark528 發表在 痞客邦 留言(0) 人氣(241)