1.高PR值站點的導入鏈接
2.內容相關頁面的導入鏈接
3.導入鏈接錨文本中包含頁面關鍵詞
4.錨文本存在于網(wǎng)頁內容中
5.錨文本周圍出現(xiàn)相關關鍵詞
6.導入鏈接存在3個月以上
7.導入鏈接所在頁面的導出鏈接少于100個
8.導入鏈接來自不同IP地址
9.導入鏈接自然增加
10.錨文本多樣化(如,SEO和SEO十萬個為什么)
原文地址:
This plugin is content slider and image slideshow. Where you can slide between slides using horizontal, vertical and fade transitions. Also you can have navigation controls, custom behavior (this plugin have very many options). Online demo available here
Using this plugin you can easy slide betweeb slides with any content (Content Slider). Allow to embed quite any content inside slides: text, images, video, tooltips etc. Also can enable thumbnails and more. Online demo available here
Using this plugin you can easy perform necessary actions when you scroll to desired element. Online demo available here
This plugin will allow you to play image sequences. So result will similar real video (it looks like GIF – animation too). Online demo available same page.
Another one UL-LI navigation menu. Online demo available here
Interesting plugin, some kind of navigation system between pages, plus give feeling what you walking through rooms of maze Online demo available here
This plugin show us vector world map (and they promising to add more maps in future). Online demo available here
There is a very serious mistake in picture, Taiwan is a part of China!
Nice looking plugin for webmasters who dreaming to build own game (RPG) website. Online demo available here
This pluging giving us few navigation modes for web applications. Online demo available here
Great looking image gallery with autoplay, descriptions and more.
Hope that our review of fresh jquery plugins was very interesting. Good luck!
The basic steps you'll need to follow to configure Ehcache for web page caching are (note that these steps assume you already have Ehcache installed in your application):
The following settings should help you setup web caching for your application.
The first thing you'll need to do is add a filter to enable page caching.
The following web.xml settings will enable a servlet filter for page caching:
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd " version="2.5"> <filter> <filter-name>SimplePageCachingFilter</filter-name> <filter-class>net.sf.ehcache.constructs.web.filter.SimplePageCachingFilter </filter-class> </filter> <!-- This is a filter chain. They are executed in the order below. Do not change the order. --> <filter-mapping> <filter-name>SimplePageCachingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app>
The second step to enabling web page caching is to configure ehcache with an appropriate ehcache.xml.
The following ehcache.xml file should configure a reasonable default ehcache:
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../main/config/ehcache.xsd"> <cache name="SimplePageCachingFilter" maxElementsInMemory="10000" maxElementsOnDisk="1000" eternal="false" overflowToDisk="true" timeToIdleSeconds="300" timeToLiveSeconds="600" memoryStoreEvictionPolicy="LFU" /> </ehcache>
package com.founder.web.ext;
import Java.util.Date;
import Java.util.HashMap;
import Java.util.Map;
import org.jmesa.core.filter.DateFilterMatcher;
import org.jmesa.core.filter.FilterMatcher;
import org.jmesa.core.filter.FilterMatcherMap;
import org.jmesa.core.filter.MatcherKey;
public class DateFilterMatcherMap implements FilterMatcherMap {
public Map<MatcherKey, FilterMatcher> getFilterMatchers() {
Map<MatcherKey, FilterMatcher> filterMatcherMap = new HashMap<MatcherKey, FilterMatcher>();
filterMatcherMap.put(new MatcherKey(Date.class, "born"), new DateFilterMatcher("MM/dd/yyyy"));
return filterMatcherMap;
}
}
現(xiàn)在需要修改tableFacade標簽為
<jmesa:tableFacade
id="tag"
filterMatcherMap="com.founder.web.ext.DateFilterMatcherMap"
<br>
<br>
textarea寬度固定,自動增高<br>
<textarea type="text" style="width:260;overflow-y:visible;"></textarea>
var oFragment = document.createDocumentFragment();
for (var i = 0; i < aTRs.length; i++) {
oFragment.appendChild(aTRs[i]);
}
oTBody.appendChild(oFragment);
oTable.sortCol = iCol;
}
</script>
</head>
<body>
This is my HTML page. <br>
<table border="1" id="tblSort">
<thead>
<tr>
<th onclick="sortTable('tblSort', 0)" style="cursor:pointer">Last Name</th>
<th onclick="sortTable('tblSort', 1)" style="cursor:pointer">First Name</th>
<th onclick="sortTable('tblSort', 2, 'date')" style="cursor:pointer">Birthday</th>
<th onclick="sortTable('tblSort', 3, 'int')" style="cursor:pointer">Age</th>
</tr>
</thead>
<tbody>
<tr>
<td>Smith</td>
<td>John</td>
<td>7/12/1978</td>
<td>31</td>
</tr>
<tr>
<td>Johnson</td>
<td>Betty</td>
<td>10/15/1977</td>
<td>32</td>
</tr>
<tr>
<td>Henderson</td>
<td>Nathan</td>
<td>02/22/1982</td>
<td>27</td>
</tr>
<tr>
<td>Williams</td>
<td>James</td>
<td>8/19/1980</td>
<td>29</td>
</tr>
<tr>
<td>Gilliams</td>
<td>Michael</td>
<td>5/13/1972</td>
<td>39</td>
</tr>
<tr>
<td>Walker</td>
<td>Matthew</td>
<td>10/19/1981</td>
<td>28</td>
</tr>
</tbody>
</table>
</body>
</html>
function sortTable(sTableID, iCol) {
var oTable = document.getElementById(sTableID);
var oTBody = oTable.tBodies[0];
var colDataRows = oTBody.rows;
var aTRs = new Array;
for (var i = 0; i < colDataRows.length; i++) {
aTRs.push(colDataRows[i]);
}
if (oTable.sortCol == iCol){
aTRs.reverse();
} else {
aTRs.sort(generateCompareTRs(iCol));
}
var oFragment = document.createDocumentFragment();
for (var i = 0; i < aTRs.length; i++) {
oFragment.appendChild(aTRs[i]);
}
oTBody.appendChild(oFragment);
oTable.sortCol = iCol;
}
<BODY>
<p>Move your mouser over the red square.</p>
<div id="div1" style="background-color:red; height:50px; width:50px" onmouseover="showTip(event);" onmouseout="hideTip(event);"><div>
<div id="divTip1" style="background-color:yellow;position:absolute;visibility:hidden;padding:5px">
<span style="font-weight:bold">Custom Tooltip</span><br/>
</div>
</BODY>
</HTML>
<BODY>
<div style ="background-color:blue; color:white; font-weight:bold; padding:10px; cursor:pointer" onclick="toggle('divContent1');">Click Here</div>
<div style="border:3px solid blue; height:100px;padding:10px" id="divContent1">
This is some content to show and hide.
</div>
<div style ="background-color:blue; color:white; font-weight:bold; padding:10px; cursor:pointer" onclick="toggle('divContent2');">Click Here</div>
<div style="border:3px solid blue; height:100px;padding:10px" id="divContent2">
This is some content to show and hide.
</div>
</BODY>
</HTML>
ShowModalDialog函數(shù)的功能:
打開一個子窗口,并且可與父窗口相互傳遞數(shù)據(jù),它與window.open的最大區(qū)別就在于由ShowModalDialog打開子窗口后,父窗口將不能操作。
使用方法:
vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])
參數(shù)說明:
sURL
必選參數(shù),類型:字符串。用來指定對話框要顯示的文檔的URL。
vArguments
可選參數(shù),類型:變體。用來向對話框傳遞參數(shù)。傳遞的參數(shù)類型不限,包括數(shù)組等。對話框通過window.dialogArguments來取得傳遞進來的參數(shù)。
sFeatures
可選參數(shù),類型:字符串。用來描述對話框的外觀等信息,可以使用以下的一個或幾個,用分號“;”隔開。
dialogHeight 對話框高度,不小于100px,IE4中dialogHeight 和 dialogWidth 默認的單位是em,而IE5中是px,為方便其見,在定義modal方式的對話框時,用px做單位。
dialogWidth: 對話框寬度。
dialogLeft: 距離桌面左的距離。
dialogTop: 離桌面上的距離。
center: {yes | no | 1 | 0 }:窗口是否居中,默認yes,但仍可以指定高度和寬度。
help: {yes | no | 1 | 0 }:是否顯示幫助按鈕,默認yes。
resizable: {yes | no | 1 | 0 } [IE5+]:是否可被改變大小。默認no。
status: {yes | no | 1 | 0 } [IE5+]:是否顯示狀態(tài)欄。默認為yes[ Modeless]或no [Modal]。
scroll:{ yes | no | 1 | 0 | on | off }:指明對話框是否顯示滾動條。默認為yes。
參數(shù)傳遞方法:
父窗口向子窗口傳遞參數(shù)采用ShowModalDialog的第2個參數(shù)即可,父窗口要獲取子窗口傳回的參數(shù)則可通過ShowModalDialog函數(shù)的返回值獲取。
子窗口獲取父窗口參數(shù)的方法為采用子窗口window對象dialogArguments屬性獲取,例如:
var a=window.dialogArguments;
子窗口向父窗口返回參數(shù)采用window.returnValue屬性,如:
window.returnValue=1;
window.close();
比如實現(xiàn)上面問題,只需要這樣:
var url = "page.html";
var retValue = window.showModalDialog(url, "newwindow", "dialogWidth:500px;dialogHeight:200px;help:no;resizable:no;scroll:no;status:no");
二、怎樣才讓在showModalDialog和showModelessDialog的超連接不彈出新窗口?
在被打開的網(wǎng)頁里加上<base target="_self">就可以了。這句話一般是放在<html>和<body>之間的。
三、怎樣才刷新showModalDialog和showModelessDialog里的內容?
在showModalDialog和showModelessDialog里是不能按F5刷新的,又不能彈出菜單。這個只能依靠javascript了,以下是相關代碼:
<body onkeydown="if (event.keyCode==116){reload.click()}">
<a id="reload" href="filename.htm" style="display:none">reload...</a>
將filename.htm替換成網(wǎng)頁的名字然后將它放到你打開的網(wǎng)頁里,按F5就可以刷新了,注意,這個要配合<base target="_self">使用,不然你按下F5會彈出新窗口的。
四、如何用javascript關掉showModalDialog(或showModelessDialog)打開的窗口。
<input type="button" value="關閉" onclick="window.close()">
也要配合<base target="_self">,不然會打開一個新的IE窗口,然后再關掉的。
具體使用辦法,
到snap網(wǎng)站可以申請到一段類似以下形式的代碼:
<script defer id="snap_preview_anywhere" type="text/javascript" src="http://spa.snap.com/snap_preview_anywhere.js?ap=1&key=739080a127808f9856fa43a8c91c4d21&sb=1&domain=dimlau.com"></script>
下面說說代碼的修改:
1、使用默認的代碼,鼠標移動到鏈接上時顯示的效果是帶搜索框的,但是可以通過修改代碼來去掉搜索框,先看效果對比:
修改方法是,將獲得代碼中的sb=1改成sb=0
2、默認代碼效果是頁面中的所有鏈接都有鼠標劃過時顯示縮略圖效果。如果你想對某個特定鏈接禁用縮略圖效果,可以對該鏈接加上一個分類來標識;
例如鏈接
<a href="xxxx">xxx</a>,禁用縮略圖的方法是寫成
<a href="xxxx" class="snap_nopreview">xxx</a>
通常,一個頁面里大部分鏈接我們都不想加入縮略圖的,所以上述辦法有點煩瑣了。
其實可以通過修改代碼中的ap=1為ap=0來使頁面的所有鏈接在默認情況下不顯示縮略圖,這時只有鏈接寫成以下格式的情況下才會有縮略圖顯示:
<a class="snap_preview" href="XXX">XXX</a>
對于上述各種情況,如果鏈接本身已經(jīng)有了某個class分類,比如已經(jīng)分類為class="123",可以用空格來分隔,并賦予多個class分類,比如
class="123 snap_nopreview"或者class="123 snap_preview"
以上為本人的一點小小心得,希望對各位看官有點幫助。
--------------------------------------------------------------------------------------------------------
對于我使用的MT,可以對模版中的評論者網(wǎng)站鏈接形式加入一個class="snap_preview"來實現(xiàn)對評論者網(wǎng)站界面的初步預覽,我覺得是個不錯的小工具。
當然其他程序,也可以做相應的修改實現(xiàn)該效果。我就不再多說了。
body {background-color:red;}
第二個是背景為綠色的CSS文件(green.css)CSS中的內容為:
body {background-color:green;}
第三個是背景為黃色的CSS文件(yellow.css)CSS中的內容為:
body {background-color:yellow;}
然后在xthml文件中加入這三個CSS的鏈接
<link rel="alternate stylesheet" href="red.css" type="text/css" title="red" media="screen, projection"/>
<link rel="stylesheet" href="green.css" type="text/css" title="green" media="screen, projection"/>
<link rel="alternate stylesheet" href="yellow.css" type="text/css" title="yellow" media="screen, projection"/>
這三個中除了title不一樣外還有一個地方有所不同,那就是REL。第一個與第三個都是alternate stylesheet只有第二個是stylesheet。這第二個就是當然樣式。
在鏈接下面再導入一個JS文件,用來控制這個樣式切換
function setActiveStyleSheet(title) {
var i, a, main;
if (title) {
for(i=0; (a = document.getElementsByTagName('link')[i]); i++) {
if(a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title')) {
a.disabled = true;
if(a.getAttribute('title') == title) a.disabled = false;
}
}
}
}
function getActiveStyleSheet() {
var i, a;
for(i=0; (a = document.getElementsByTagName('link')[i]); i++) {
if(a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title') && !a.disabled) return a.getAttribute('title');
}
return null;
}
在合適的地方加入三個切換按鈕
<a href="javascript :void()" onclick="setActiveStyleSheet('red'); return false;" title="紅色樣式"></a>
<a href="javascript :void()" onclick="setActiveStyleSheet('green'); return false;" title="綠色樣式"></a>
<a href="javascript :void()" onclick="setActiveStyleSheet('yellow'); return false;" title="黃色樣式"></a>
<a href="javascript :void()" onclick="setActiveStyleSheet('none'); return false;" title="沒有樣式"></a>
好了發(fā)布試試點那三個切換鏈接!是不是已經(jīng)切換了樣式?
補遺:帶有記憶功能的JS文檔
function setActiveStyleSheet(title) {
var i, a, main;
for(i=0; (a = document.getElementsByTagName
("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style")
!= -1 && a.getAttribute("title")) {
a.disabled = true;
if(a.getAttribute("title") == title)
a.disabled = false;
}
}
}
function getActiveStyleSheet() {
var i, a;
for(i=0; (a = document.getElementsByTagName
("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style")
!= -1 && a.getAttribute("title") && !a.disabled)
return a.getAttribute("title");
}
return null;
}
function getPreferredStyleSheet() {
var i, a;
for(i=0; (a = document.getElementsByTagName
("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1
&& a.getAttribute("rel").indexOf("alt") == -1
&& a.getAttribute("title")
) return a.getAttribute("title");
}
return null;
}
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else expires = "";
document.cookie = name+"="+value+expires+";
path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return
c.substring(nameEQ.length,c.length);
}
return null;
}
window.onload = function(e) {
var cookie = readCookie("style");
var title = cookie ? cookie :
getPreferredStyleSheet();
setActiveStyleSheet(title);
}
window.onunload = function(e) {
var title = getActiveStyleSheet();
createCookie("style", title, 365);
}
var cookie = readCookie("style");
var title = cookie ? cookie :
getPreferredStyleSheet();
setActiveStyleSheet(title);