onmouseover细节应该根据代码中的条件出现 [英] onmouseover the detail should appear based on condition in the code

查看:54
本文介绍了onmouseover细节应该根据代码中的条件出现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

if(LblMN.Text ==Incident)

{



if(LblURS.Text ==New)

{

int iStart = LnkMSid.Text.IndexOf(Incident is New);



GridView1 .Rows [i] .Cells [4] .Attributes.Add(Style,background:url(../ Images / flag_blue.gif)no-repeat;+ LnkMSid.Text.Substring(iStart + 1,LnkMSid.Text .Length-1));

}



从上面代码我想问。在网格单元格中鼠标悬停时,我希望事件是新的出现,图像应该相应地出现,但根据我的代码,没有什么可以实现的。那么代码应该是什么?

if (LblMN.Text == "Incident")
{

if (LblURS.Text=="New")
{
int iStart = LnkMSid.Text.IndexOf("Incident is New");

GridView1.Rows[i].Cells[4].Attributes.Add(Style", background: url(../Images/flag_blue.gif) no-repeat;" + LnkMSid.Text.Substring(iStart + 1,LnkMSid.Text.Length-1));
}

From Above code i would like to ask . On mouseover in grid cell i want "Incident is new" to appear and the image should appear accordingly, but according my code nothing haapens. what should be the code then?

推荐答案

谢谢大家的帮助我已经解决了。



以下是正确的代码。

鼠标悬停时我得到了我想要的结果。





if(LblMN.Text ==Incident)

{



if(LblURS.Text ==New)

{

LnkMSid.ToolTip(事件是新的);



GridView1.Rows [i] .Cells [4] .Attributes.Add(Style",background:url(../ Images / flag_blue.gif)no-repeat;);

}
Thank you all for your help I have solved it.

And below is the correct code.
On mousehover i am getting my desired result.


if (LblMN.Text == "Incident")
{

if (LblURS.Text=="New")
{
LnkMSid.ToolTip("Incident is New");

GridView1.Rows[i].Cells[4].Attributes.Add(Style", background: url(../Images/flag_blue.gif) no-repeat;");
}


if (LblMN.Text == "Incident")
{

if (LblURS.Text=="New")
{
LnkMSid.ToolTip("Incident is New");

GridView1.Rows[i].Cells[4].Attributes.Add(Style", background: url(../Images/flag_blue.gif) no-repeat;");


这篇关于onmouseover细节应该根据代码中的条件出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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