因為17"的1280*1024螢幕看自己的blog還很吃力,
震怒之下做出來的。
##ReadMore##
插入HTML/Script元件
原始碼如下(複製就ok):
<select id="dSelPYMChangeFontSize" onchange="pym_change_font_size(parseInt(this.value));">
<option value="0">預設</option>
<option value="1">1 (超小)</option>
<option value="2">2 (很小)</option>
<option value="3">3 (小)</option>
<option value="4">4 (標準)</option>
<option value="5">5 (大)</option>
<option value="6">6 (很大)</option>
<option value="7">7 (超大)</option>
</select>
<script>
function pym_change_font_size(intSize){
var strCoo = document.cookie ? document.cookie : "";
var re = new RegExp("fontSize=([0-7])");
var res = re.exec(strCoo);
var strSizeArr = ["", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"];
var dSel = document.getElementById("dSelPYMChangeFontSize");
if(intSize == -1){
if(res){
document.body.style.fontSize = strSizeArr[parseInt(res[1])];
dSel.value = parseInt(res[1]);
}
}else{
document.body.style.fontSize = strSizeArr[intSize];
document.cookie = "fontSize=" + intSize + "";
}
}
pym_change_font_size(-1);
</script>
沒有留言:
張貼留言