如何在asp按钮中调用css [英] how to call css in asp button

查看:236
本文介绍了如何在asp按钮中调用css的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在asp按钮上调用此CSS

how to call this css on asp button

button.greyroundedbtn span {
background: transparent url(../images/btn_left.png ) no-repeat scroll left top;
color: #000000;
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px;
}

推荐答案



如果您想更改按钮上单击的页面所附的样式表,那么我建议您使用一个小的JS函数.那应该为您解决问题.

链接到CSS
Hi,

If you want to change the Style Sheet attached to a page on button click then i would suggest you make use of a small JS function. That should do the trick for you.

Link To the CSS
<link id="defaultStyle" href="styleSheet1.css" media="all" type="text/css" rel="stylesheet" />



将此添加到您的javascript模块.



Add this to your javascript Module.

function changeStyleSheet( styleSheetName ){
    document.getElementById( "defaultStyle" ).href= styleSheetName ;
    } 





<input type="button" value="styleSheetName.css"  onclick="changeStyleSheet( this.value )" />



BR//
Harsha



BR//
Harsha


这篇关于如何在asp按钮中调用css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆