公告板
 2007-01-18網址變更,請使用新網址瀏覽網站。http://blog.nnickk.com/
 2007-01-17有任何問題歡迎到留言板留言!
 廣告一則電腦桌椅專賣店,另有辦公桌椅、家具、寢具等您來挑...
瀏覽模式: 普通 | 列表

肯德基歡喜慶生超值好康29元起

attachments/month_0605/l200651375415.jpg

使用期限:95/05/08~95/06/30

完整折價券位置
標籤:  肯德基 折價券

認真的藝人--蔡依林-舞孃

attachments/month_0605/e2006512115443.jpg

認真的藝人--蔡依林,
儘管之前曾經在SOGO有過一面之緣
但也不曾有過特別的感觸,
今天晚上偶然看到亞洲大獎,蔡依林在舞台上的演出,以及Ugirl的練舞花絮,
讓我看傻了眼,有種驚為天人的感觸。

attachments/month_0604/a200643035043.jpg

還記得蔡依林剛出道,
那時後我還是大一新鮮人,
媒體爭相報導著,
當然不是報導我剛升大一,
而是這位歌壇新星-蔡依林,
朋友們大都冷嘲熱諷著,
長的也不好看、也沒胸部、歌也還好,
但那時我卻看到了不一樣的眼神,
執著的眼神。

attachments/month_0605/4200651212147.jpg

如今事實證明,
實力是必須靠時間來累積及驗證的,
也許剛出道的時候並不是才藝豐厚的藝人,
但我看得到她的努力,
很多藝人在唱衰唱片業,抨擊盜版猖獗得時候,
我卻是看到更多沒才氣卻只想賺大錢的藝人,
你以為只有唱片有盜版,只有你們工作比較累,
真的是令人啼笑皆非,
我相信各行各業都有類似的情景,
各行各業也都有各自的辛酸,
但,不喜歡就不要做嘛!
如果是為了錢才做,那你就沒有資格抱怨!

attachments/month_0604/2200643035115.jpg

認真的藝人-蔡依林,
我相信練舞、練歌,絕對是一種很艱苦的過程,
但我更相信他執著的眼神,
累,是為了更美好的表現而累,
加油。

attachments/month_0605/620065121213.jpg

請不要吝嗇支持認真的藝人。
蔡依林Jolin 2006最新專輯 舞孃 Dancing Diva

蔡依林的部落格:Jolin Blog
圖片來源:蔡依林國際歌友會

相關報導:
蔡依林完美演出 老外讚嘆
蔡依林體操舞步高難度 2006 MTV亞洲大獎
2006MTV亞洲大獎揭曉王力宏獎風光蔡依林舞高潮
蔡依林曼谷舞孃秀

後記:
這一篇文章我打了兩次,因為第一次打完,在找圖片的時候當機了,通常如果發生這種事,我是不可能再打第二次了,所以,蔡依林我很給你面子哦!


[教學]在日誌裡插入UrMap電子地圖 for PJBlog-2.5-


05/18 2211 新增地標
05/12 2315 修正錯誤訊息
05/12 2254 修正直接顯示地圖


這是用PJBlog做範例,其他系統的請自行研究。

修改教學:
下載我修改的程式,覆蓋原本的檔案。
有兩種版本,一種是完全不用修改(以後發表需要輸入授權碼),
另一種必須修改程式碼(以後發表不需輸入授權碼),
請選擇其一下載。

不需修改的版本:
[down=attachments/month_0605/e200651264043.rar]點擊下載此文件[/down]

需修改common/UBBCode_IE.js,common/UBBCode_Gecko.js兩個檔案,檔案最後面附近,把授權碼換成你申請的授權碼,授權碼從哪裡來,請看下面。
[down=attachments/month_0605/u20065117115.rar]點擊下載此文件[/down]

使用教學:
首先您必須要有一組UrMap的授權碼,申請UrMap授權碼

接著在您的Blog裡發表日誌的時候,選擇UBBeditor會發現UBB編輯器專家後面多了一個插入地圖

attachments/month_0605/k20065117165.jpg

按插入地圖,會請您先輸入緯度經度,及該地點的名稱

好了,這樣您的電子地圖就OK了,不知道經緯度,請到此查詢

另外,如果您是用我修改的code,請勿刪除UBB支援UrMap By nnickk-Blog字樣,讓小站打一下知名度,謝謝。

已知問題:
1.一個頁面只能用一個地圖,用兩個第二個會出不來,有興趣的自己研究吧!
2.插入地圖之後,回覆評論的簡易UBB失效。

效果:[nkhtml_nk1]
[/nkhtml_nk1]

修改UBB code可執行html語言,及UrMap地圖

今天修改了UBB Code,
讓特殊標籤可以執行html,
最主要是因為發現了一個好玩的UrMap地圖,
為了讓UrMap地圖可以在日誌裡出現,
所以修改了一下,
效果請參閱:
食:和民居食屋
標籤:  ubb urmap 地圖 html

[轉載]逢甲大學 校友招待所







國內有不少大專院校都會設立招待所,之前貓姐也介紹過 東華大學『學人招待所』;此類招待所除了提供外賓來訪時一個舒適的落腳處外,也開放給學生、教職員及校友投宿,對於到學校附近洽公或是訪友的人來說實在是相當經濟又方便,尤其是考試季節,巷子內的人都知道可以住招待所,此時就可以請各地的朋友幫忙了 "戴太陽眼鏡"

這次 levise 要介紹的是 逢甲大學 校友招待所,逢甲大學附近是台中相當重要的商圈,而到其他商圈的距離也不遠,位置相當不錯,不少以前的同學畢業後來台中洽公都來住這 "很棒"

""
逢甲校友招待所靜靜地座落在學校的角落,由於藏身在謐靜的小巷中,連不少逢甲人都不知道學校有這樣一間招待所,更不要說是外校人士了 @@" 旁邊就是新落成的體育館及游泳池,有空還可以去做運動啦~

""
一樓入門右手邊就是服務台,平常時候還蠻少人住的,但是最好來住之前先電話預約比較保險,打電話來時會先問你是否有開車來,有停車証可以開到學校內停放,在逢甲這個很難找停車位的地方可是相當地方便阿!

""
一樓大廳是挑高的空間,採光相當良好,有書報及舒適的沙發可消磨時光

""
一樓的後方有個餐廳,不過並沒有提供餐飲,以逢甲附近的生活機能來說,應該也不會有人想在這邊吃吧 "XD" 附近有許多美味小吃或餐廳可供選擇,也可買外食回來在這邊聊邊吃,旁邊還有台投幣式的咖啡機,相當適合與三五好友在此小聚

""
餐廳的旁邊有茶水間及廚房,茶水間內有冰箱、熱水瓶、洗衣機...等設備,廚房還有瓦斯爐及一些鍋碗瓢盆,如果要自行開伙的話也沒有問題,不過...看看外面的選擇那麼多,這邊最大的功能大概就是煮泡麵了吧... "吐舌頭"

""
二樓以上都是客房,這是雙人套房的內裝,前陣子招待所才剛改裝完,設備看起來都還相當新穎,房間的擺設一看就知道走商務路線,室內有無線網路,但是某些地方訊號較弱,可以跟櫃台借用網路線,使用時要經過網頁認證,帳號密碼就在房間的鑰匙圈上

""
房間是很正規的 P 形套房,床舖相當柔軟舒適,整體環境維護得非常乾淨,且房間內有不少插座,果然是很商務取向的內裝 "戴太陽眼鏡"

""
乾溼分離的浴室,地板保持得很乾淨,該附上的衛生用品一樣不缺,毛巾、浴巾、牙刷、肥皂、梳子...等等,有需要的都有,洗手台邊也有吹風機;浴室水溫很穩定,不會忽冷忽熱,一定可以舒服的洗個澡,紓解一天的辛勞 "眨眼睛"

我覺得逢甲的校友招待所真的是台中相當經濟實惠的好住所,價錢可以參考官方網頁,以我住的雙人套房,不論平日假日都只要 1000 元,附近的生活機能相當齊全,不論是去洽公、渡假或是旅行中繼點都是很不錯的選擇,逛逢甲夜市或百貨公司都不遠,小黃可以輕易的送你到想去的地方,只是要注意招待所有門禁,00:00 ~ 6:00,要盡量在午夜前回去才不會造成服務人員的困擾;有機會到台中的人一定要列入考慮,可以請逢甲人幫忙訂房喔~


























"" "" "" "" ""
"" "" 相關資訊 "" ""
"" "" "" "" ""









""



































分類 住宿 - 飯店或汽車旅館
地址 台中市西屯區文華路100號
電話 04-27012634 或 04-24517250 轉 6547
營業時間 6:00 ~ 24:00
無線網路服務
URL 按這裡檢視
座標 東經 120° 38' 59.0"   北緯 24° 10' 54.5"
評分 "5分"

""











"" "" "" "" ""

























"" "" "" "" ""
"" ""   "" ""
"" "" "" "" ""









""   ""











"" "" "" "" ""

























"" "" "" "" ""
"" ""   "" ""
"" "" "" "" ""









""   ""









"" "" ""



按一下,察看地圖





 


先說,我不是逢甲人,所以我沒辦法代訂哦!


只是覺得有這種服務真好...


資料來源:http://www.mobile01.com/waypointdetail.php?id=1767

藍色小舖掛點

常用Html語法

禁止頁面正文選取
<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()">

消除ie6自動出現的圖像工具欄,設置 GALLERYIMG屬性為false或no .
<IMG SRC="mypicture.jpg" HEIGHT="100px" WIDTH="100px" GALLERYIMG="no">

防止點擊空鏈接時,頁面往往重置到頁首端。
代碼「java script:void(null)」代替原來的「#」標記

如何避免別人把你的網頁放在框架中
<script language=「javascript」><!--if (self!=top){top.location=self.location;} -->< /script>

頁面定時刷新
<meta http-equiv="Refresh" content="秒" >

頁面定時轉向新的地址
<meta http-equiv="refresh" content="秒;URL=url">

顯示日期
<script language="JavaScript">
<!--
today=new Date();
var week; var date;
if(today.getDay()==0) week="星期日"
if(today.getDay()==1) week="星期一"
if(today.getDay()==2) week="星期二"
if(today.getDay()==3) week="星期三"
if(today.getDay()==4) week="星期四"
if(today.getDay()==5) week="星期五"
if(today.getDay()==6) week="星期六"
date=(today.getYear())+"年"+(today.getMonth()+1)+"月"+today.getDate()+"日"+" "
documents.write("<span style='font-size: 9pt;'>"+date+week+"</span>");
// -->
</script>

設為首頁
<A href=# onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('url');">設為首頁</A>

添加收藏
<A href="java script:window.external.AddFavorite('url','title')"> 加入收藏夾</A>


漸隱的特效
將下面的代碼複製到<head>~</head>裡:
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)">
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)">

<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)"> // 進入時漸隱
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)">  // 退出時漸隱


網頁播放器~
特效名稱:十分棒的MIDI播放器
[共2步](可根據相應的項目修改)


1、將以下代碼加入HTML的<head></head>之間:
<Script Language="JavaScript">
<!-- Hiding
song = new Array()
var x = 0
song[1] = "Mid1"
song[2] = "Mid2"
song[3] = "Mid3"
song[4] = "mid1"
song[5] = "mid2"
song[6] = "mid3"
function prev(){
if (x>1)
{ x--
document.midi.typein.value=song [x]
}
}
function next(){
var max= song.length-1
if (x<max)
{ x++
document.midi.typein.value=song [x]
}
}
function go(){
if (x != 0){
location.href='mid'+x+'.mid'
//以上指定播放的是當前路徑的midi文件,文件名分別是mid1.mid-mid6.mid //
}
}
function start(){
x=1
document.midi.typein.value=song [x]
}
function end(){
x=song.length-1
document.midi.typein.value=song [x]
}
function cls(){
document.midi.typein.value="選曲"
}
// Done Hiding -->
</Script>


2、將以下代碼加入HTML的<body></body>之間區:


<BODY onload="cls()">
<FORM Name="midi">
<INPUT NAME="typein" TYPE="text" SIZE="25" ALIGN=top><BR>
<font size=3>
<INPUT TYPE=Button Value="|<<" Align=left onclick="start()">
<INPUT TYPE=Button Value="<<" Align=left onclick="prev()">
<input type=Button value="PLAY" align=left onClick="go()" name="Button">
<INPUT TYPE=Button Value=">>" Align=left onclick="next()">
<INPUT TYPE=Button Value=">>|" Align=left onclick="end()">
</font>
</FORM>


跟隨鼠標飄動的時鐘
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY>
<SCRIPT language=JavaScript>
dCol='000000';//date colour.
fCol='000000';//face colour.
sCol='000000';//seconds colour.
mCol='000000';//minutes colour.
hCol='000000';//hours colour.
ClockHeight=40;
ClockWidth=40;
ClockFromMouseY=0;
ClockFromMouseX=100;


//Alter nothing below! Alignments will be lost!


d=new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY";
m=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER";
date=new Date();
day=date.getDate();
year=date.getYear();
if (year < 2000) year=year+1900;
TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
D=TodaysDate.split('');
H='...';
H=H.split('');
M='....';
M=M.split('');
S='.....';
S=S.split('');
Face='1 2 3 4 5 6 7 8 9 10 11 12';
font='Arial';
size=1;
speed=0.6;
ns=(document.layers);
ie=(document.all);
Face=Face.split(' ');
n=Face.length;
a=size*10;
ymouse=0;
xmouse=0;
scrll=0;
props="<font face="+font+" size="+size+" color="+fCol+"><B>";
props2="<font face="+font+" size="+size+" color="+dCol+"><B>";
Split=360/n;
Dsplit=360/D.length;
HandHeight=ClockHeight/4.5
HandWidth=ClockWidth/4.5
HandY=-7;
HandX=-2.5;
scrll=0;
step=0.06;
currStep=0;
y=new Array();x=new Array();Y=new Array();X=new Array();
for (i=0; i < n; i++){y=0;x=0;Y=0;X=0}
Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();
for (i=0; i < D.length; i++){Dy=0;Dx=0;DY=0;DX=0}
if (ns){
for (i=0; i < D.length; i++)
documents.write('<layer name="nsDate'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D+'</font></center></layer>');
for (i=0; i < n; i++)
documents.write('<layer name="nsFace'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face+'</font></center></layer>');
for (i=0; i < S.length; i++)
documents.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+sCol+'><center><b>'+S+'</b></center></font></layer>');
for (i=0; i < M.length; i++)
documents.write('<layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+mCol+'><center><b>'+M+'</b></center></font></layer>');
for (i=0; i < H.length; i++)
documents.write('<layer name=nsHours'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+hCol+'><center><b>'+H+'</b></center></font></layer>');
}
if (ie){
documents.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < D.length; i++)
documents.write('<div id="ieDate" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props2+D+'</B></font></div>');
documents.write('</div></div>');
documents.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
documents.write('<div id="ieFace" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props+Face+'</B></font></div>');
documents.write('</div></div>');
documents.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++)
documents.write('<div id="ieHours" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+hCol+';text-align:center;font-weight:bold">'+H+'</div>');
documents.write('</div></div>');
documents.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++)
documents.write('<div id="ieMinutes" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+mCol+';text-align:center;font-weight:bold">'+M+'</div>');
documents.write('</div></div>')
documents.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++)
documents.write('<div id="ieSeconds" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+sCol+';text-align:center;font-weight:bold">'+S+'</div>');
documents.write('</div></div>')
}
(ns)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;
}
(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
function ClockAndAssign(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;
if (ie){
Od.style.top=window.document.body.scrollTop;
Of.style.top=window.document.body.scrollTop;
Oh.style.top=window.document.body.scrollTop;
Om.style.top=window.document.body.scrollTop;
Os.style.top=window.document.body.scrollTop;
}
for (i=0; i < n; i++){
var F=(ns)?document.layers['nsFace'+i]:ieFace.style;
F.top=y + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;
F.left=x + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);
}
for (i=0; i < H.length; i++){
var HL=(ns)?document.layers['nsHours'+i]:ieHours.style;
HL.top=y+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
HL.left=x+HandX+(i*HandWidth)*Math.cos(hrs);
}
for (i=0; i < M.length; i++){
var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes.style;
ML.top=y+HandY+(i*HandHeight)*Math.sin(min)+scrll;
ML.left=x+HandX+(i*HandWidth)*Math.cos(min);
}
for (i=0; i < S.length; i++){
var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds.style;
SL.top=y+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
SL.left=x+HandX+(i*HandWidth)*Math.cos(sec);
}
for (i=0; i < D.length; i++){
var DL=(ns)?document.layers['nsDate'+i]:ieDate.style;
DL.top=Dy + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/180)+scrll;
DL.left=Dx + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/180);
}
currStep-=step;
}
function Delay(){
scrll=(ns)?window.pageYOffset:0;
Dy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed);
Dx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed);
for (i=1; i < D.length; i++){
Dy=Math.round(DY+=(Dy[i-1]-DY)*speed);
Dx=Math.round(DX+=(Dx[i-1]-DX)*speed);
}
y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
for (i=1; i < n; i++){
y=Math.round(Y+=(y[i-1]-Y)*speed);
x=Math.round(X+=(x[i-1]-X)*speed);
}
ClockAndAssign();
setTimeout('Delay()',20);
}
if (ns||ie)window.onload=Delay;
</SCRIPT>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><FONT color=blue>Hi Guys this is
amazing.</FONT size=20 Color=red><BR>I do not know who wrote this HTML code.<br>Asoka Liyanage.</BODY></HTML>


1. oncontextmenu="window.event.returnValue=false" 將徹底屏蔽鼠標右鍵
<table border oncontextmenu=return(false)><td>no</table> 可用於Table


2. <body onselectstart="return false"> 取消選取、防止複製


3. onpaste="return false" 不准粘貼


4. oncopy="return false;" oncut="return false;" 防止複製


5. <link rel="Shortcut Icon" href="favicon.ico"> IE地址欄前換成自己的圖標


6. <link rel="Bookmark" href="favicon.ico"> 可以在收藏夾中顯示出你的圖標


7. <input style="ime-mode:disabled"> 關閉輸入法


8. 永遠都會帶著框架
<script language="JavaScript"><!--
if (window == top)top.location.href = "frames.htm"; //frames.htm為框架網頁
// --></script>


9. 防止被人frame
<SCRIPT LANGUAGE=JAVASCRIPT><!--
if (top.location != self.location)top.location=self.location;
// --></SCRIPT>


10. 網頁將不能被另存為
<noscript><iframe src=*.html></iframe></noscript>


11.查看網頁源代碼
<input type=button value=查看網頁源代碼 onclick="window.location = "view-source:"+ "http://www.51js.com/"">


12.刪除時確認
<a href="java script:if(confirm("確實要刪除嗎?"))location="boos.asp?&areyou=刪除&page=1"">刪
除</a>


13. 取得控件的絕對位置
//Javascript
<script language="Javascript">
function getIE(e){
var t=e.offsetTop;
var l=e.offsetLeft;
while(e=e.offsetParent){
t+=e.offsetTop;
l+=e.offsetLeft;
}
alert("top="+t+"/nleft="+l);
}
</script>
//VBScript
<script language="VBScript"><!--
function getIE()
dim t,l,a,b
set a=document.all.img1
t=document.all.img1.offsetTop
l=document.all.img1.offsetLeft
while a.tagName<>"BODY"
set a = a.offsetParent
t=t+a.offsetTop
l=l+a.offsetLeft
wend
msgbox "top="&t&chr(13)&"left="&l,64,"得到控件的位置"
end function
--></script>


14. 光標是停在文本框文字的最後
<script language="javascript">
function cc()
{
var e = event.srcElement;
var r =e.createTextRange();
r.moveStart("character",e.value.length);
r.collapse(true);
r.select();
}
</script>
<input type=text name=text1 value="123" onfocus="cc()">


15. 判斷上一頁的來源
java script:
document.referrer


16. 最小化、最大化、關閉窗口
<object id=hh1 classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">
<param name="Command" value="Minimize"></object>
<object id=hh2 classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">
<param name="Command" value="Maximize"></object>
<OBJECT id=hh3 classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM NAME="Command" VALUE="Close"></OBJECT>
<input type=button value=最小化 onclick=hh1.Click()>
<input type=button value=最大化 onclick=hh2.Click()>
<input type=button value=關閉 onclick=hh3.Click()>
本例適用於IE


17.屏蔽功能鍵Shift,Alt,Ctrl
<script>
function look(){
if(event.shiftKey)
alert("禁止按Shift鍵!"); //可以換成ALT CTRL
}
document.onkeydown=look;
</script>


18. 網頁不會被緩存
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
或者<META HTTP-EQUIV="expires" CONTENT="0">


19.怎樣讓表單沒有凹凸感?
<input type=text style="border:1 solid #000000">

<input type=text style="border-left:none; border-right:none; border-top:none; border-bottom:
1solid #000000"></textarea>


20.<div><span>&<layer>的區別?
<div>(division)用來定義大段的頁面元素,會產生轉行
<span>用來定義同一行內的元素,跟<div>的唯一區別是不產生轉行
<layer>是ns的標記,ie不支持,相當於<div>


21.讓彈出窗口總是在最上面:
<body onblur="this.focus();">


22.不要滾動條?
讓豎條沒有:
<body style="overflow:scroll;overflow-y:hidden">
</body>
讓橫條沒有:
<body style="overflow:scroll;overflow-x:hidden">
</body>
兩個都去掉?更簡單了
<body scroll="no">
</body>


23.怎樣去掉圖片鏈接點擊後,圖片周圍的虛線?
<a href="#" onFocus="this.blur()"><img src="logo.jpg" border=0></a>


24.電子郵件處理提交表單
<form name="form1" method="post" action="mailto:****@***.com" enctype="text/plain">
<input type=submit>
</form>


25.在打開的子窗口刷新父窗口的代碼裡如何寫?
windows.opener.location.reload()


26.如何設定打開頁面的大小
<body onload="top.resizeTo(300,200);">
打開頁面的位置<body onload="top.moveBy(300,200);">


27.在頁面中如何加入不是滿鋪的背景圖片,拉動頁面時背景圖不動
<STYLE>
body
{background-image:url(logo.gif); background-repeat:no-repeat;
background-position:center;background-attachment: fixed}
</STYLE>


28. 檢查一段字符串是否全由數字組成
<script language="Javascript"><!--
function checkNum(str){return str.match(//D/)==null}
alert(checkNum("1232142141"))
alert(checkNum("123214214a1"))
// --></script>


29. 獲得一個窗口的大小
document.body.clientWidth; document.body.clientHeight


30. 怎麼判斷是否是字符
if (/[^/x00-/xff]/g.test(s)) alert("含有漢字");
else alert("全是字符");


31.TEXTAREA自適應文字行數的多少
<textarea rows=1 name=s1 cols=27 onpropertychange="this.style.posHeight=this.scrollHeight">
</textarea>


32. 日期減去天數等於第二個日期
<script language=Javascript>
function cc(dd,dadd)
{
//可以加上錯誤處理
var a = new Date(dd)
a = a.valueOf()
a = a - dadd * 24 * 60 * 60 * 1000
a = new Date(a)
alert(a.getFullYear() + "年" + (a.getMonth() + 1) + "月" + a.getDate() + "日")
}
cc("12/23/2002",2)
</script>


33. 選擇了哪一個Radio
<HTML><script language="vbscript">
function checkme()
for each ob in radio1
if ob.checked then window.alert ob.value
next
end function
</script><BODY>
<INPUT name="radio1" type="radio" value="style" checked>Style
<INPUT name="radio1" type="radio" value="barcode">Barcode
<INPUT type="button" value="check" onclick="checkme()">
</BODY></HTML>


34.腳本永不出錯
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide
function killErrors() {
return true;
}
window.onerror = killErrors;
// -->
</SCRIPT>


35.ENTER鍵可以讓光標移到下一個輸入框
<input onkeydown="if(event.keyCode==13)event.keyCode=9">


36. 檢測某個網站的鏈接速度
把如下代碼加入<body>區域中:
<script language=Javascript>
tim=1
setInterval("tim++",100)
b=1
var autourl=new Array()
autourl[1]="www.njcatv.net"
autourl[2]="javacool.3322.net"
autourl[3]="www.sina.com.cn"
autourl[4]="www.nuaa.edu.cn"
autourl[5]="www.cctv.com"
function butt(){
documents.write("<form name=autof>")
for(var i=1;i<autourl.length;i++)
documents.write("<input type=text name=txt"+i+" size=10 value=測試中……> =》<input type=text
name=url"+i+" size=40> =》<input type=button value=GO
onclick=windows.open(this.form.url"+i+".value)><br>")
documents.write("<input type=submit value=刷新></form>")
}
butt()
function auto(url){
document.forms[0]["url"+b].value=url
if(tim>200)
{document.forms[0]["txt"+b].value="鏈接超時"}
else
{document.forms[0]["txt"+b].value="時間"+tim/10+"秒"}
b++
}
function run(){for(var i=1;i<autourl.length;i++)documents.write("<img
src=http://"+autourl+"/"+Math.random()+" width=1 height=1
onerror=auto("http://"+autourl+"")>")}
run()</script>


37. 各種樣式的光標
style="cursor:hand"
auto :標準光標
default :標準箭頭
hand :手形光標
wait :等待光標
text :I形光標
vertical-text :水平I形光標
no-drop :不可拖動光標
not-allowed :無效光標
help :?幫助光標
all-scroll :三角方向標
move :移動標
crosshair :十字標
e-resize
n-resize
nw-resize
w-resize
s-resize
se-resize
sw-resize


38.頁面進入和退出的特效
進入頁面<meta http-equiv="Page-Enter" content="revealTrans(duration=x, transition=y)">
推出頁面<meta http-equiv="Page-Exit" content="revealTrans(duration=x, transition=y)">
這個是頁面被載入和調出時的一些特效。duration表示特效的持續時間,以秒為單位。transition表示使
用哪種特效,取值為1-23:
   0 矩形縮小
   1 矩形擴大
   2 圓形縮小
   3 圓形擴大
   4 下到上刷新
   5 上到下刷新
   6 左到右刷新
   7 右到左刷新
   8 豎百葉窗
   9 橫百葉窗
   10 錯位橫百葉窗
   11 錯位豎百葉窗
   12 點擴散
   13 左右到中間刷新
   14 中間到左右刷新
   15 中間到上下
   16 上下到中間
   17 右下到左上
   18 右上到左下
   19 左上到右下
   20 左下到右上
   21 橫條
   22 豎條
   23 以上22種隨機選擇一種


39.在規定時間內跳轉
<META http-equiv=V="REFRESH" content="5;URL=http://www.51js.com">


40.網頁是否被檢索
<meta name="ROBOTS" content="屬性值">
  其中屬性值有以下一些:
  屬性值為 "all": 文件將被檢索,且頁上鏈接可被查詢;
  屬性值為 "none": 文件不被檢索,而且不查詢頁上的鏈接;
  屬性值為 "index": 文件將被檢索;
  屬性值為 "follow": 查詢頁上的鏈接;
  屬性值為 "noindex": 文件不檢索,但可被查詢鏈接;
  屬性值為 "nofollow": 文件不被檢索,但可查詢頁上的鏈接。


js多層菜單
<!-- Saved From url=http://js.jojoo.net -->
<!-- Web Design bbs url=http://www.qybbs.net-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="">
<style type=text/css>
body { background:#799AE1; margin:0px; font:normal 12px 細明體; }
table { border:0px; }
td { font:normal 12px 細明體; }
img { vertical-align:bottom; border:0px; }
a { font:normal 12px 細明體; color:#215DC6; text-decoration:none; }
a:hover { color:#428EFF }
.sec_menu { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#D6DFF7; }
.menu_title { }
.menu_title span { position:relative; top:2px; left:8px; color:#215DC6; font-weight:bold; }
.menu_title2 { }
.menu_title2 span { position:relative; top:2px; left:8px; color:#428EFF; font-weight:bold; }
</style>
<script language=javascript>
function menuShow(obj,maxh,obj2)
{
if(obj.style.pixelHeight<maxh)
{
obj.style.pixelHeight+=maxh/20;
obj.filters.alpha.opacity+=5;
obj2.background="http://images.jojoo.net/js/title_bg_hide.gif";;
if(obj.style.pixelHeight==maxh/10)
obj.style.display='block';
myObj=obj;
myMaxh=maxh;
myObj2=obj2;
setTimeout('menuShow(myObj,myMaxh,myObj2)','5');
}
}
function menuHide(obj,maxh,obj2)
{
if(obj.style.pixelHeight>0)
{
if(obj.style.pixelHeight==maxh/20)
obj.style.display='none';
obj.style.pixelHeight-=maxh/20;
obj.filters.alpha.opacity-=5;
obj2.background="http://images.jojoo.net/js/title_bg_show.gif";;
myObj=obj;
myMaxh=maxh
myObj2=obj2;
setTimeout('menuHide(myObj,myMaxh,myObj2)','5');
}
else
if(whichContinue)
whichContinue.click();
}
function menuChange(obj,maxh,obj2)
{
if(obj.style.pixelHeight)
{
menuHide(obj,maxh,obj2);
whichOpen='';
whichcontinue='';
}
else
if(whichOpen)
{
whichContinue=obj2;
whichOpen.click();
}
else
{
menuShow(obj,maxh,obj2);
whichOpen=obj2;
whichContinue='';
}
}
</script>
<base target=main>
</head>


<body onselectstart="return false;" ondragstart="return false;" oncontextmenu="return false;">
<table cellpadding=0 cellspacing=0 width=158 align=center>
<tr style="cursor:hand;">
<td height=42 valign=bottom>
<img src=http://images.jojoo.net/js/title.gif width=158 height=38>
</td>
</tr>
</table>


<table cellpadding=0 cellspacing=0 width=158 align=center>
<tr style="cursor:hand;">
<td height=25 class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; background=http://images.jojoo.net/js/title_bg_hide.gif id=menuTitle1 onclick="menuChange(menu1,80,menuTitle1);">
<span>系統選項</span>
</td>
</tr>
<tr>
<td>
<div class=sec_menu style="width:158px;height:80px;filter:alpha(Opacity=100);overflow:hidden;" id=menu1>
<table cellpadding=0 cellspacing=0 align=center width=135 style="position:relative;top:10px;">
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_safe.gif>
安全選項</a>
</td>
</tr>
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_recycle.gif>
垃圾郵件選項</a>
</td>
</tr>
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_dynamic.gif>
動態規則選項</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<script language=javascript>
var whichOpen=menuTitle1;
var whichContinue='';
</script>


<table cellpadding=0 cellspacing=0 width=158 align=center>
<tr style="cursor:hand;">
<tdheight=25 class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; background=http://images.jojoo.net/js/title_bg_show.gif id=menuTitle2 onclick="menuChange(menu2,120,menuTitle2);">
<span>系統規則</span>
</td>
</tr>
<tr>
<td>
<div class=sec_menu style="width:158;height:0;filter:alpha(Opacity=0);display:none;" id=menu2>
<table cellpadding=0 cellspacing=0 align=center width=135 style="position:relative;top:10px;">
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_ip.gif>
IP過濾規則</a>
</td>
</tr>
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_mailer.gif>
信封過濾規則</a>
</td>
</tr>
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_mailheader.gif>
信頭過濾規則</a>
</td>
</tr>
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_mailbody.gif>
信體過濾規則</a>
</td>
</tr>
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_accessory.gif>
附件過濾規則</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>


<table cellpadding=0 cellspacing=0 width=158 align=center>
<tr style="cursor:hand;">
<td height=25 class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; background=http://images.jojoo.net/js/title_bg_show.gif id=menuTitle3 onclick="menuChange(menu3,120,menuTitle3);">
<span>系統管理</span>
</td>
</tr>
<tr>
<td>
<div class=sec_menu style="width:158;height:0;filter:alpha(Opacity=0);display:none;" id=menu3>
<table cellpadding=0 cellspacing=0 align=center width=135 style="position:relative;top:10px;">
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_user.gif>
用戶管理</a>
</td>
</tr>
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_course.gif>
進程管理</a>
</td>
</tr>
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_host.gif>
主機運行狀態</a>
</td>
</tr>
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_data.gif>
數據備份</a>
</td>
</tr>
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_recycle.gif>
垃圾目錄管理</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>


<table cellpadding=0 cellspacing=0 width=158 align=center>
<tr style="cursor:hand;">
<td height=25 class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; background=http://images.jojoo.net/js/title_bg_show.gif id=menuTitle4 onclick="menuChange(menu4,140,menuTitle4);">
<span>系統統計</span>
</td>
</tr>
<tr>
<td>
<div class=sec_menu style="width:158;height:0;filter:alpha(Opacity=0);display:none;" id=menu4>
<table cellpadding=0 cellspacing=0 align=center width=135 style="position:relative;top:10px;">
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_ip.gif>
IP過濾統計</a>
</td>
</tr>
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_mailer.gif>
信封過濾統計</a>
</td>
</tr>
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_mailheader.gif>
信頭過濾統計</a>
</td>
</tr>
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_mailbody.gif>
信體過濾統計</a>
</td>
</tr>
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_accessory.gif>
附件過濾統計</a>
</td>
</tr>
<tr>
<td height=20>
<a href=http://qybbs.net onfocus=this.blur();><img src=http://images.jojoo.net/js/icon_dynamic.gif>
動態規則統計</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>


<table cellpadding=0 cellspacing=0 width=158 align=center>
<tr style="cursor:hand;">
<td height=25 class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; background=http://images.jojoo.net/js/title_bg_quit.gif>
<span>退出系統</span>
</td>
</tr>
</table>
</body>


</html>


1.獲得系統時間:
  <%=now()%>


2.取得來訪用的IP:
<%=request.server<I>var</I>iables("remote_host")%>


3.獲得系統,瀏覽器版本:
<<I>script</I>>
<I>window</I>.documents.write("版本:"+navigator.appName+navigator.appVersion+" browser.")
</<I>script</I>>


4.去除IE混動條:
<body scroll="no">
<body style="overflow-y:hidden">


5.進入網站,跳出廣告:
<<I>script</I> language="Java<I>script</I>">
<!--
<!-- 注意更改文件所在路徑-->
<I>window</I>.open(''http://www.XXXXXX.com'','''',''height=200,width=300,top=0,left=30'');
// -->
</<I>script</I>>


6.隨機數:
<%randomize%>
<%=(int(rnd()*n)+1)%>
N為可改變數


7.向上混動代碼:
<marquee direction="up" scrolldelay="200" style="font-size: 9pt; color: #FF0000; line-height: 150%; font-style:italic; font-weight:bold" scrollamount="2" width="206" height="207" bgcolor="#FFFF00">hhhhhhhhhhhhhhhhhhh</marquee>


8.自動關閉網頁:
<<I>script</I> LANGUAGE="Java<I>script</I>">
<!--
setTimeout(''<I>window</I>.close();'', 10000); //60秒後關閉
// -->
</<I>script</I>>
<p align="center">本頁10秒後自動關閉,請注意刷新頁面</p>


9.隨機背景音樂:
<%randomize%>
<bgsound src="mids/<%=(int(rnd()*60)+1)%>.mid" loop="-1">


可以修改數字,限制調用個數,我這裡是60個.


10.自動刷新本頁面:
<<I>script</I>>
<!--


<I>var</I> limit="0:10"


if (document.images){
<I>var</I> parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
}
<I>function</I> beginrefresh(){
if (!document.images)
return
if (parselimit==1)
<I>window</I>.location.reload()
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+"分"+cursec+"秒後重刷本頁!"
else
curtime=cursec+"秒後重刷本頁!"
<I>window</I>.status=curtime
setTimeout("beginrefresh()",1000)
}
}


<I>window</I>.<I>onload</I>=beginrefresh
<I>file:</I>//-->
</<I>script</I>>


11.ACCESS數據庫連接:
<%
option explicit
dim startime,endtime,conn,connstr,db
startime=timer()
′更改數據庫名字
db="data/dvBBS5.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
′如果你的服務器採用較老版本Access驅動,請用下面連接方法
′connstr="driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath(db)
conn.Open connstr
<I>function</I> CloseDatabase
Conn.close
Set conn = Nothing
End <I>function</I>
%>


12.SQL數據庫連接:
<%
option explicit
dim startime,endtime,conn,connstr,db
startime=timer()
connstr="driver={SQL Server};server=HUDENQ-N11T33NB;uid=sa;pwd=xsfeihu;database=dvbbs"
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open connstr
<I>function</I> CloseDatabase
Conn.close
Set conn = Nothing
End <I>function</I>
%>


13.用鍵盤打開網頁代碼:
<<I>script</I> language="java<I>script</I>">
<I>function</I> ctlent(eventobject)
{
  if((event.ctrlKey && <I>window</I>.event.keyCode==13)||(event.altKey && <I>window</I>.event.keyCode==83))
  {
    <I>window</I>.open(′網址′,′′,′′)
  }
}
</<I>script</I>>


這裡是Ctrl+Enter和Alt+S的代碼 自己查下鍵盤的ASCII碼再換就行


14.讓層不被控件覆蓋代碼:
<div z-Index:2><object xxx></object></div> # 前面
<div z-Index:1><object xxx></object></div> # 後面
<div id="Layer2" style="position:absolute; top:40;width:400px; height:95px;z-index:2"><table height=100% width=100% bgcolor="#ff0000"><tr><td height=100% width=100%></td></tr></table><<I>iframe</I> width=0 height=0></<I>iframe</I>></div>
<div id="Layer1" style="position:absolute; top:50;width:200px; height:115px;z-index:1"><<I>iframe</I> height=100% width=100%></<I>iframe</I>></div>


15.動網FLASH廣告代碼:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="468" height="60"><param name=movie value="images/yj16d.swf"><param name=quality value=high><embed src="images/dvbanner.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash";; type="application/x-shockwave-flash" width="468" height="60"></embed></object>


16.VBS彈出窗口小代碼:
<<I>script</I> language=vb<I>script</I>>
msgbox"你還沒有註冊或登陸論壇","0","精品論壇"
location.href = "login.asp"
</<I>script</I>>


16.使用FSO修改文件特定內容的函
<I>function</I> FSOchange(filename,Target,String)
Dim objFSO,objCountFile,FiletempData
Set objFSO = Server.CreateObject("<I>script</I>ing.FileSystemObject")
Set objCountFile = objFSO.OpenTextFile(Server.MapPath(filename),1,True)
FiletempData = objCountFile.ReadAll
objCountFile.Close
FiletempData=Replace(FiletempData,Target,String)
Set objCountFile=objFSO.CreateTextFile(Server.MapPath(filename),True)
objCountFile.Write FiletempData
objCountFile.Close
Set objCountFile=Nothing
Set objFSO = Nothing
End <I>function</I>


17.使用FSO讀取文件內容的函數
<I>function</I> FSOFileRead(filename)
Dim objFSO,objCountFile,FiletempData
Set objFSO = Server.CreateObject("<I>script</I>ing.FileSystemObject")
Set objCountFile = objFSO.OpenTextFile(Server.MapPath(filename),1,True)
FSOFileRead = objCountFile.ReadAll
objCountFile.Close
Set objCountFile=Nothing
Set objFSO = Nothing
End <I>function</I>


18.使用FSO讀取文件某一行的函數
<I>function</I> FSOlinedit(filename,lineNum)
if linenum < 1 then exit <I>function</I>
dim fso,f,temparray,tempcnt
set fso = server.CreateObject("<I>script</I>ing.filesystemobject")
if not fso.fileExists(server.mappath(filename)) then exit <I>function</I>
set f = fso.opentextfile(server.mappath(filename),1)
if not f.AtEndofStream then
tempcnt = f.readall
f.close
set f = nothing
temparray = split(tempcnt,chr(13)&chr(10))
if lineNum>ubound(temparray)+1 then
  exit <I>function</I>
else
  FSOlinedit = temparray(lineNum-1)
end if
end if
end <I>function</I>


19.使用FSO寫文件某一行的函數
<I>function</I> FSOlinewrite(filename,lineNum,Linecontent)
if linenum < 1 then exit <I>function</I>
dim fso,f,temparray,tempCnt
set fso = server.CreateObject("<I>script</I>ing.filesystemobject")
if not fso.fileExists(server.mappath(filename)) then exit <I>function</I>
set f = fso.opentextfile(server.mappath(filename),1)
if not f.AtEndofStream then
tempcnt = f.readall
f.close
temparray = split(tempcnt,chr(13)&chr(10))
if lineNum>ubound(temparray)+1 then
  exit <I>function</I>
else
  temparray(lineNum-1) = lineContent
end if
tempcnt = join(temparray,chr(13)&chr(10))
set f = fso.createtextfile(server.mappath(filename),true)
f.write tempcnt
end if
f.close
set f = nothing
end <I>function</I>


20.使用FSO添加文件新行的函數
<I>function</I> FSOappline(filename,Linecontent)
dim fso,f
set fso = server.CreateObject("<I>script</I>ing.filesystemobject")
if not fso.fileExists(server.mappath(filename)) then exit <I>function</I>
set f = fso.opentextfile(server.mappath(filename),8,1)
f.write chr(13)&chr(10)&Linecontent
f.close
set f = nothing
end <I>function</I>

標籤:  target html asp

ASP讀取網頁原始碼

<%
Function Bin2Str(Bin)
  Dim I, Str
  For I=1 to LenB(Bin)
   clow=MidB(Bin,I,1)
   if ASCB(clow)<128 then
    Str = Str & Chr(ASCB(clow))
   else
    I=I+1
    if I <= LenB(Bin) then Str = Str & Chr(ASCW(MidB(Bin,I,1)&clow))
   end if
  Next
  Bin2Str = Str
End Function

Function GetHTML(strURL)
 Dim objXMLHTTP, strReturn
 Set objXMLHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
 objXMLHTTP.Open "GET", strURL, False
 objXMLHTTP.Send
 strReturn =objXMLHTTP.responseBody
 Set objXMLHTTP = Nothing
 strReturn=bin2str(strReturn)
 GetHTML = strReturn
End Function
%>
<%
Response.Write GetHTML("http://www.kimo.com.tw/")
%>

標籤: asp 原始碼

ASP反解Server.URLEncode

CODE:


<script language=&#34;vbscript&#34; runat=&#34;server&#34;>

    Function AnsiCode(vstrIn)

        Dim i, strReturn, innerCode, ThisChr

        Dim Hight8, Low8

        strReturn = &#34;&#34;

        For i = 1 To Len(vstrIn)

            ThisChr = Mid(vStrIn,i,1)

            If Abs(Asc(ThisChr)) < &HFF Then

                strReturn = strReturn & ThisChr

            Else

                innerCode = Asc(ThisChr)

                If innerCode < 0 Then

                    innerCode = innerCode + &H10000

                End If

                Hight8 = (innerCode And &HFF00)  &HFF

                Low8 = innerCode And &HFF

                strReturn = strReturn & &#34;%&#34; & Hex(Hight8) & &#34;%&#34; & Hex(Low8)

            End If

        Next

        AnsiCode = strReturn

    End Function

    

    Function DeCodeAnsi(s)

        Dim i, sTmp, sResult, sTmp1

        sResult = &#34;&#34;

        For i=1 To Len(s)

            If Mid(s,i,1)=&#34;%&#34; Then

                sTmp = &#34;&H&#34; & Mid(s,i+1,2)

                If isNumeric(sTmp) Then

                    If CInt(sTmp)=0 Then

                        i = i + 2

                    ElseIf CInt(sTmp)>0 And CInt(sTmp)<128 Then

                        sResult = sResult & Chr(sTmp)

                        i = i + 2

                    Else

                        If Mid(s,i+3,1)=&#34;%&#34; Then

                            sTmp1 = &#34;&H&#34; & Mid(s,i+4,2)

                            If isNumeric(sTmp1) Then

                                sResult = sResult & Chr(CInt(sTmp)*16*16 + CInt(sTmp1))

                                i = i + 5

                            End If

                        Else

                            sResult = sResult & Chr(sTmp)

                            i = i + 2

                        End If

                    End If

                Else

                    sResult = sResult & Mid(s,i,1)

                End If

            Else

                sResult = sResult & Mid(s,i,1)

            End If

        Next

        DeCodeAnsi = sResult

    End Function

</script>

<script language=&#34;JAVASCRIPT&#34; runat=&#34;server&#34;>

    function ReadText(s){

        try{

            return decodeURIComponent(s);

        }catch(e){

            return DeCodeAnsi(s);

        }

    }

</script>

<%

'使用

=ReadText(xxx)

%>

[轉載]不實廣告點擊 Google雅虎困擾

不實廣告點擊 Google雅虎困擾

【編譯陳家齊/美聯社七日電】


線上搜尋業者Google成功地靠網路廣告賺進大筆營收,但業主指控有些計算廣告的點擊次數是惡意的偽造流量,Google沒有盡到阻擋這類「點擊詐欺」(Click fraud)的責任。集體訴訟正在進行,雅虎(Yahoo!)也面臨相同的官司。 &nbsp;@&nbsp;http://udn.com&nbsp;&nbsp;""


Google在3月初提出一項9,000萬美元的和解案,希望解決這場集體訴訟。其中6,000萬美元將以廣告點數的方式付給廣告業主,可用來抵付在Google刊登廣告的費用;另外3,000 萬美元付給代表廣告主打官司的律師。無論如何,這對擁有100億美元現金的Google是九牛一毛。


一名阿肯色州法官將在6月24日召開為期兩天的聽證會,決定是否採納Google的和解方案。Google的官司正因和解提案而暫停,Yahoo則同樣在阿肯色州法庭面臨相同的訴訟。


廣告業主Radiators.com執行長賴斯憤怒地認為,Google 的提案不足以補償他們的損失。Google提出的賠償計算公式,是把過去四年半來0.45%的廣告營收視作應該賠償的詐欺點擊。但一些獨立研究聲稱,Google廣告的點擊量有10%到40%來自詐欺點擊。若依後者計算,Google必須賠償10億到50億美元才行。


詐欺點擊的產生原因很多。一個主來源是廣告業主的商業對手,藉由製造大量的詐欺點擊量,掏空業主的廣告預算。另一個可能是來自與Google、Yahoo合作的小型廣告商,他們藉著灌水的流量,拆得更多佣金。


因此Google、Yahoo的賠償責任,就要看他們是否有盡責阻擋這類刻意灌水的點擊量。6月底開庭時將有一分