脚本无法在MOZILLA中使用 [英] SCRIPT not working in MOZILLA

查看:52
本文介绍了脚本无法在MOZILLA中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经编写了以下代码和脚本.它可以在IE和CHROME中工作,但不能在Mozilla中工作.

I have written the following code and script. Its working in IE and in CHROME, but not Working in Mozilla.

function SelectAll(id) {
        window.setTimeout(function () {
            document.getElementById(id).select();
        }, 1);


我的HTML代码如下


My HTML code is as below

<asp:TextBox ID="txtAddress" TextMode="MultiLine" onfocusin ="SelectAll(this.id);"  ondblclick="this.focus();this.select()" runat="server" TabIndex="6"  MaxLength="300"
               SkinID="textarea-small-style" ValidationGroup="requied"></asp:TextBox>



请帮助我找到解决方案.我是初学者.



Please help me to find a solution for this. I''m a beginner.

推荐答案

而不是"onfocusin" ,请放置"onfocus".让我们看下面的修改后的代码.

instead of "onfocusin", Please place "onfocus". let see the modified code below.

<asp:TextBox ID="txtAddress" TextMode="MultiLine" onfocus ="SelectAll(this.id);"  ondblclick="this.focus();this.select()" runat="server" TabIndex="6"  MaxLength="300"

                SkinID="textarea-small-style" ValidationGroup="requied"></asp:TextBox>


这篇关于脚本无法在MOZILLA中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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