校园春色亚洲色图_亚洲视频分类_中文字幕精品一区二区精品_麻豆一区区三区四区产品精品蜜桃

主頁 > 知識庫 > 利用vbs類實現css按鈕的代碼

利用vbs類實現css按鈕的代碼

熱門標簽:深圳外呼系統收費 拉薩外呼系統業務 合肥高德地圖標注 百度地圖標注是什么意思 怎么看地圖標注 廣州ai電銷機器人一般多少錢 外呼線路中繼線是什么 外呼系統telrobot 外呼系統免費招代理
復制代碼 代碼如下:


rem 文章標題: 利用vbs類實現css按鈕 
rem 作者:yanek 
rem 聯系: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 建立類的實例 

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

rem 設置按鈕對象的相關屬性 

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 調用方法輸出按鈕 
Response.Write btnYahoo.GenerateStyleTag() 
Response.Write btnYahoo.GenerateButtonTag() 
Response.Write "p> /p>" 



rem 設置按鈕對象的相關屬性 
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 調用方法輸出按鈕 
Response.Write btnLycos.GenerateStyleTag() 
Response.Write btnLycos.GenerateButtonTag() 
%> 



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

標簽:廣安 臺灣 周口 六安 玉林 延安 嘉興 漳州

巨人網絡通訊聲明:本文標題《利用vbs類實現css按鈕的代碼》,本文關鍵詞  利用,vbs,類,實現,css,按鈕,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《利用vbs類實現css按鈕的代碼》相關的同類信息!
  • 本頁收集關于利用vbs類實現css按鈕的代碼的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 沙洋县| 驻马店市| 江永县| 广河县| 县级市| 芮城县| 荥阳市| 肇源县| 进贤县| 新乐市| 新乐市| 搜索| 宁河县| 石阡县| 盐池县| 昭觉县| 车致| 蒲江县| 柳州市| 辽阳县| 隆德县| 斗六市| 建湖县| 湘乡市| 柏乡县| 西青区| 峨眉山市| 行唐县| 阿克苏市| 达孜县| 岢岚县| 方城县| 石门县| 元江| 杨浦区| 会理县| 黄梅县| 乐至县| 确山县| 海城市| 衡水市|