我想更改鼠标悬停时按钮的行为,例如背景颜色,文本颜色等. [英] I want to change behaviour of button on mouseover Like Background color, text color etc.

查看:73
本文介绍了我想更改鼠标悬停时按钮的行为,例如背景颜色,文本颜色等.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的

我想将鼠标悬停在按钮上的行为
不可点击事件
因为在onClick上我是受保护的功能.

请任何人告诉我该怎么做.

dear

I want to behaviour of button on mouse hover
not on click event
because on onClick i am a protected function.

Please any one tell me how can do this.

推荐答案



1.您可能想像下面的代码一样使用jQuery
Hi,

1.You want to use jQuery probably like below code
<input type="button" onmouseover="fillText()" /> <input type="text" id="textbox" name="textbox" /> 


function fillText() {


(#textBox").val =您的文本"; }
("#textBox").val = "Your Text"; }



请转到lik了解更多解决方案

http://bytes.com/topic/asp- net/answers/863164-how-make-mouse-over-event-asp-net [



Please go to this lik for more solution

http://bytes.com/topic/asp-net/answers/863164-how-make-mouse-over-event-asp-net[^]


大不了?
<input type="button" onmouseover="this.bgColor='#FFFFFF'" onmouseout="this.bgColor='#000000'" />

如果要显示以前的颜色,请在OnMouseOut事件中更改颜色值鼠标移出

Change color value in OnMouseOut event if you want to show previous color on Mouse out


这篇关于我想更改鼠标悬停时按钮的行为,例如背景颜色,文本颜色等.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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