English 中文(简体)
互联网探索者,j Query:投入箱在替换时充斥/移动
原标题:Internet explorer, jQuery: input box jumps/moves when being replaced with the exact same one

www.un.org/Depts/DGACM/index_spanish.htm 我想要的是:就重点而言,通过藏匿和显示,将一个投入箱变成另一个。

www.un.org/Depts/DGACM/index_spanish.htm 我获得的: 在互联网探索者(7/8年)中,投入箱在集中关注时将几张素子移至右边。

  • Works well in other browsers (obviously).

这里与我重新讨论该问题的一个环节是:

并加固; 由于不再贴切相关联线而被拆除;

来文方可在上文链接的档案中查阅,但为了方便起见,我也在此列。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-language" content="en"/>
<script src="includes/jquery-1.4.2.min.js"></script>
<script>
$(document).ready(function(){
    $("#index_login_dummy").focus(function(){
        $(this).hide();
        $( #index_login_dummy2 ).show().focus();
    });
});
</script>
<style type="text/css">
.input_h {display:none;}
</style>
</head>

<body>

<div id="index_login">
    <form method="post" name="index_login" action="login.php">
    <input id="index_login_email" type="text" value="Email" name="email">
    <input id="index_login_dummy" type="text" value="Password" name="dummy">
    <input id="index_login_dummy2" type="text" class="input_h" value="Password" name="dummy"><input type="submit" class="input_button" value="Login">
    </form>
</div>

</body>
</html>

+1 for a well developed question!

EDIT:

当我把形式领域列入一个表格时,它按预期运作。 我有时猜测你们必须找到解决办法,但我不明白为什么。 然而,我对不同的浏览器以不同方式提取形式投入要素的解释感到 fine惜(在IEC中,投入纽伦影响到其余部分)。

工作守则:

<div id="index_login">
    <form method="post" name="index_login" action="login.php">
    <table>
        <tr>
            <td><input id="index_login_email" type="text" value="Email" name="email"></td>
            <td><input id="index_login_dummy" type="text" value="Password" name="dummy"><input id="index_login_dummy2" type="text" class="input_h" value="Password2" name="dummy"></td>
            <td><input type="submit" class="input_button" value="Login"></td>
        </tr>
    </table>
    </form>
</div>
最佳回答

我认为,这里的问题是,“指数_login_dummy2”文本箱与提交国之间没有间隔。 如果您把您的文体改为:inline; 你们应当看到这一问题。

一种解决办法是,对“指数_login_dummy2”箱的权利适用一个差值。

.input_h { display:none; margin-right: 4px; }

.。

问题回答

一、导 言

<span>    
<input id="index_login_email" type="text" value="Email" name="email">
<input id="index_login_dummy" type="text" value="Password" name="dummy"></span>

I had this jumping problem(moving px on the screen to the left or right) in IE9 on input and select elements. I first thought it was caused by the :focus pseudo selector. This appeared not to be cause. When i changed the css rule from display: inline-block to display:block the jumping elements problem was solved





相关问题
Image rendered with wrong colors in IE8

I have a gradient image as a PNG (no transparency) in a web-page. By taking a screenshot of Chrome showing the page and cropping the image from the page, I see the exact same colors are drawn as the ...

Determine Mobile Internet Explorer version

I need to determine the version of Mobile Internet Explorer on a Windows Mobile 6.1 device. So that I can report the same user-agent string as is being used by Mobile Internet Explorer. The user-...

CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

Internet Explorer only part loading JavaScript/CSS

I m having trouble with my local development environment where IE (6 through to 8) is only part loading JavaScript/CSS files. It throws random errors at random places in jquery.min.js every time I ...

IE doesn t run Javascript when you click back button

I ve built a shop with tons of JS running. One of the pieces of the cart, is a zip code field which is required to calculate shipping cost. This works fine going through the cart. Now clicking ...

热门标签