Javascript-форум (https://javascript.ru/forum/)
-   jQuery (https://javascript.ru/forum/jquery/)
-   -   Странная работа в Хроме и Сафари (https://javascript.ru/forum/jquery/11697-strannaya-rabota-v-khrome-i-safari.html)

Flake 08.09.2010 10:18

Странная работа в Хроме и Сафари
 
Здравствуйте.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Copying and Pasting in a TextBox</title>
    <script src="http://i.auto.ru/js/jquery-1.4.2.js" type="text/javascript"></script>
    
    <script>
    var a = 0;
        $(function () {
            $('.hint').each(function (){            
                if(this.value == '' || this.value == this.title){
                    $(this).val($(this).attr('alt')).addClass('c-grey');
                }
            });
        });
    </script>
</head>
<body>
<form method="get">
    <input type="text" 0="" title="Укажите стоимость" alt="Укажите стоимость" maxlength="14" class="text hint parseInt c-grey" id="car-cost" name="car_cost">
    <input type="submit" value="Отправить" class="submit">
</form>
</body>
</html>

Почему форма везде сабмиттится, кроме Хрома и Сафари? В этих браузерах просто фокус переходит на поле и всё.

inGray 08.09.2010 10:28

А что вы ожидали увидеть?


Часовой пояс GMT +3, время: 23:21.