在光标上方更改按钮名称 [英] change button name on cursor over

查看:56
本文介绍了在光标上方更改按钮名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,我正在从事实时拍卖项目..有一个按钮名称立即出价",如果用户未登录,则他将光标放在按钮上"时,他看到登录信息,如果已经登录,比他可以出价...我该如何设置效果... !!!

提前thnx .. !!

i have one problem,i am working on live auction project..there is one button name "bid now" and if user is not login than,when "he put cursor over button" than he see login and if he is already login than he can place the bid...how can i put this effect...!!!

thnx in advance..!!

推荐答案

尝试这个人,我确定它会很好用:
这是javascript函数:
try this man i am sure it will works good:
this is the javascript functions :
<script type="text/javascript">
        var previoustxt;
        function changetxt(el) {
            var s = el.style;
            previoustxt = el.value;
            el.value = 'Blue';
        }
        function restoretxt(el) {
            el.value = previoustxt;
        }
    </script>


这是按钮:


and this is the button :

<asp:button id="btnSearch" runat="server" backcolor="#800000" font-bold="True" font-names="Arial" xmlns:asp="#unknown">
       onmouseover="changetxt(this);" onmouseout="restoretxt(this);" ForeColor="White" Height="28px" Text="Search Jobz"
        Width="117px" /></asp:button>



最好的问候
评价是否对您有帮助



best regards
rate if it helps you


您为什么要这样做?即使您设法更改了按钮名称,但是如果用户单击按钮,会发生什么?这个怎么样?当用户单击Bid Now时,启动您的身份验证模块.如果用户未登录,请重定向到登录页面.否则,请继续投标.
Why do you want to do that? Even if you managed to change the button name, what happens if the user clicked the button? How about this? When the user clicks Bid Now, fire up your authentication module. If the user is not logged in, redirect to the login page. Otherwise, proceed with the bidding.


这篇关于在光标上方更改按钮名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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