制作網(wǎng)站怎樣在網(wǎng)頁中使用包含文件?深圳網(wǎng)站制作公司整理歸納主要有以下方法。
①IFrame引入。
②在HTML文件中調(diào)用JS文件。
③對于動態(tài)網(wǎng)頁,還可以采用include調(diào)用文件。
怎樣在網(wǎng)頁中輸入上下標(biāo)?
如果只是要上下標(biāo)的話,可以用<SUB></SUB>和<SUP></SUP>,手工加進去就可以了。
制作網(wǎng)站時如何讓瀏覽者知道自己訪問網(wǎng)頁的次數(shù)?
知道訪問網(wǎng)頁次數(shù)的具體操作步驟如下。原始文件附錄A/附錄A42/index.html最終文件附錄A/附錄A42/index1.html學(xué)習(xí)要點知道訪問網(wǎng)頁次數(shù)
?打開素材文件“附錄A/附錄A42/index.html”,如圖A-71所示。
?將光標(biāo)放置在相應(yīng)的位置,單擊【代碼視圖】按鈕,切換到代碼視圖狀態(tài)下,輸入以下代碼,< script language=" JavaScript"> var caution = false function setCookie( name, value, expires, path, domain, secure) { var curCookie = name + "=" + escape( value) + ((expires) ? "; expires=" + expires. toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "") if (!caution || (name + "=" + escape( value)). length <= 4000) document. cookie = curCookie else if (confirm(" Cookie exceeds 4KB and will be cut!")) document. cookie = curCookie } function getCookie( name) { var prefix = name + "=" var cookieStartIndex = document. cookie. indexOf( prefix) if (cookieStartIndex == -1)
return null var cookieEndIndex= document. cookie. indexOf(";", cookieStartIndex + prefix. length) if (cookieEndIndex==- 1) cookieEndIndex = document. cookie. length return unescape( document. cookie. substring( cookieStartIndex + prefix. length, cookieEndIndex)) } function deleteCookie( name, path, domain) { if (getCookie( name)) { document. cookie= name+"=" + ((path) ? "; path="+ path: "") + ((domain) ? "; domain=" + domain : "") + "; expires= Thu, 01- Jan- 70 00: 00: 01 GMT" } } function fixDate( date) { var base = new Date( 0) var skew = base. getTime() if (skew > 0) date. setTime( date. getTime() - skew) } var now = new Date() fixDate( now) now. setTime( now. getTime() + 365 * 24 * 60 * 60 * 1000) var visits = getCookie(" counter") if (!visits) visits = 1 else visits = parseInt( visits) + 1 setCookie(" counter", visits, now) document. write(" 您 已 訪問 本站" + visits + "次.") </ script>
如圖A-72所示。
?保存文檔,按F12鍵在瀏覽器中預(yù)覽效果,如圖A-73所示。
好了,網(wǎng)站制作公司本文關(guān)于“制作網(wǎng)站怎樣在網(wǎng)頁中使用包含文件?”等相關(guān)網(wǎng)站搭建知識以及常見問題的處理方法就分享到這里,謝謝關(guān)注,博納網(wǎng)絡(luò)編輯整理。