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

主頁 > 知識庫 > 利用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按鈕的代碼的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 永安市| 清原| 玉树县| 海伦市| 肥东县| 苍梧县| 安新县| 开化县| 杭州市| 门头沟区| 阜宁县| 彰化市| 峨眉山市| 安溪县| 绥阳县| 潍坊市| 璧山县| 兴安盟| 襄樊市| 华蓥市| 金平| 富宁县| 临汾市| 保德县| 云阳县| 南丰县| 唐海县| 余庆县| 威远县| 连江县| 紫阳县| 甘泉县| 邵武市| 吴堡县| 新乐市| 云浮市| 渝北区| 哈巴河县| 和龙市| 高尔夫| 镇坪县|