单击和模糊组合不起作用 [英] On click and on blur combination is not working

查看:66
本文介绍了单击和模糊组合不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个用户控件,我有一个图像按钮和文本框以及一些其他控件.我在文本框中显示了模糊事件,然后在图像按钮中单击了事件.
如果遇到模糊"事件,则不会触发单击"事件..如果没有模糊",则单击事件有效.我已将按钮的原因验证设置为false.但仍然不会触发点击事件.该如何解决??

Thx
nirmal

Hi,

I have a user control i have an image button and text box and some other controls. I have on blur event in text box and click event in image button.
if ''on blur'' event is attched ''click'' event is not firing.. if no ''onblur'' then click event is working. I have set the causes validation of button to false. but still its not firing the click event. how to resolve it.?

Thx
nirmal

推荐答案

首先在源文件"Enter Search"中提供此文本框的值
然后
在文本框onclick上写此

First give this value of textbox in source file "Enter Search"
then
on textbox onclick write this

function Searchclear()
    {
    var a=document.getElementById("txtSearch");
    if(a.value="Enter Search")
    {
    a.value="";
    return false;
    }
   return true;
    }



在文本框上的onblur事件上写下此内容



on textbox onblur event write this

function Searchadd()
   {
   var a=document.getElementById("txtSearch");
   if(a.value=="")
   {
   a.value="Enter Search";
   return false;
   }
   return true;

   }


如果可行,请投票..
祝你好运..........
:cool:


If it works then vote..
good luck...................
:cool:


希望 [
Hope this[^] might help you.


这篇关于单击和模糊组合不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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