濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > 利用vbs類(lèi)實(shí)現(xiàn)css按鈕的代碼

利用vbs類(lèi)實(shí)現(xiàn)css按鈕的代碼

熱門(mén)標(biāo)簽:深圳外呼系統(tǒng)收費(fèi) 拉薩外呼系統(tǒng)業(yè)務(wù) 合肥高德地圖標(biāo)注 百度地圖標(biāo)注是什么意思 怎么看地圖標(biāo)注 廣州ai電銷(xiāo)機(jī)器人一般多少錢(qián) 外呼線路中繼線是什么 外呼系統(tǒng)telrobot 外呼系統(tǒng)免費(fèi)招代理
復(fù)制代碼 代碼如下:


rem 文章標(biāo)題: 利用vbs類(lèi)實(shí)現(xiàn)css按鈕 
rem 作者:yanek 
rem 聯(lián)系:aspboy@263.net 

Class CssButton 

  Public Name 
  Public BackColor 
  Public BorderColor 
  Public Font 
  Public FontColor 
  Public Width 
  Public Text 
  Public Url 

  Public MouseOverColor 

     
  Public Function GenerateStyleTag() 
    'Create the STYLE tag 
    Dim strStyle 
    strStyle =     "STYLE TYPE=""text/css"">"  vbCrLf  _ 
                   "!--"  vbCrLf  _ 
                   "#mybutton"  Name  "   {border-style: inset; "  vbCrLf  _ 
                   "             border-color: "  BorderColor  ";"  vbCrLf  _ 
                   "             background-color: "  BackColor  ";"  vbCrLf  _ 
                   "             width: "  Width  ";"  vbCrLf  _ 
                   "             text-align: center; }"  vbCrLf  vbCrLf  vbCrLf  _ 
                   "A.buttontext"  Name  " {color: "  FontColor  "; "  vbCrLf  _ 
                   "              text-decoration: none; "  vbCrLf  _ 
                   "              font: "  Font  ";"  vbCrLf  _ 
                   "              cursor: hand; }"  vbCrLf  vbCrLf  vbCrLf  _ 
                   ".buttonover"  Name  " {color: "  MouseOverColor  ";"  vbCrLf  _ 
                   "             text-decoration: none; "  vbCrLf  _ 
                   "             font: "  Font  ";"  vbCrLf  _ 
                   "             cursor: hand; }"  vbCrLf  _ 
                   " // -->"  vbCrLf  _ 
                   "/STYLE>" 

    GenerateStyleTag = strStyle 
  End Function 


  Public Function GenerateButtonTag() 
    Dim strHTML 
    strHTML = "a href="""  Url  """ class=""buttontext"  Name  """ "  _ 
              "onMouseOver=""this.className='buttonover"  Name  "';"" "  _ 
              "onMouseOut=""this.className='buttontext"  Name  "';"">"  _ 
              vbCrLf  "div id=""mybutton"  Name  """>"  vbCrLf  Text  vbCrLf  "/div>/a>"  vbCrLf 

    GenerateButtonTag = strHTML 
  End Function 

End Class 

rem 建立類(lèi)的實(shí)例 

Dim btnYahoo, btnLycos 
Set btnYahoo = New CssButton 
Set btnLycos = New CssButton 

rem 設(shè)置按鈕對(duì)象的相關(guān)屬性 

btnYahoo.BackColor = "#aaaaaa" 
btnYahoo.BorderColor = "#bbbbbb" 
btnYahoo.Font = "bold 12pt Verdana" 
btnYahoo.FontColor = "black" 
btnYahoo.Width = "80px" 
btnYahoo.MouseOverColor = "yellow" 
btnYahoo.Url = "http://www.yahoo.com/" 
btnYahoo.Name = "yahoo" 
btnYahoo.Text = "Yahoo!" 

rem 調(diào)用方法輸出按鈕 
Response.Write btnYahoo.GenerateStyleTag() 
Response.Write btnYahoo.GenerateButtonTag() 
Response.Write "p> /p>" 



rem 設(shè)置按鈕對(duì)象的相關(guān)屬性 
btnLycos.BackColor = "#aaaaaa" 
btnLycos.BorderColor = "#bbbbbb" 
btnLycos.Font = "10pt Arial" 
btnLycos.FontColor = "black" 
btnLycos.Width = "70px" 
btnLycos.MouseOverColor = "yellow" 
btnLycos.Url = "http://www.lycos.com/" 
btnLycos.Name = "lycos" 
btnLycos.Text = "Lycos" 

rem 調(diào)用方法輸出按鈕 
Response.Write btnLycos.GenerateStyleTag() 
Response.Write btnLycos.GenerateButtonTag() 
%> 



演示:http://www.cnaspol.com/vbsclasscssbutton.asp

標(biāo)簽:廣安 臺(tái)灣 周口 六安 玉林 延安 嘉興 漳州

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《利用vbs類(lèi)實(shí)現(xiàn)css按鈕的代碼》,本文關(guān)鍵詞  利用,vbs,類(lèi),實(shí)現(xiàn),css,按鈕,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《利用vbs類(lèi)實(shí)現(xiàn)css按鈕的代碼》相關(guān)的同類(lèi)信息!
  • 本頁(yè)收集關(guān)于利用vbs類(lèi)實(shí)現(xiàn)css按鈕的代碼的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    申扎县| 沂水县| 会同县| 台南县| 松原市| 阿城市| 高阳县| 静乐县| 正宁县| 藁城市| 张家界市| 保德县| 威海市| 垦利县| 古浪县| 巫山县| 崇文区| 上饶县| 雅江县| 繁昌县| 澄迈县| 马公市| 克拉玛依市| 临颍县| 渭南市| 克什克腾旗| 缙云县| 五莲县| 新余市| 抚松县| 平顺县| 陵川县| 临西县| 梧州市| 周至县| 恩平市| 垫江县| 永吉县| 商丘市| 合阳县| 延庆县|