Consider following HTML snippet:

<input type="text" value="zombie"/>
<input type="submit" />
What will be the value of attribute "value" after executing following jQuery code snippet?

$('input[type="button"]').click(function(){
        $('input[type="text"]').val('human');
});
Explanation

$('input[type="text"]').val('human');
Will change the 'input[type="text"]' value.

$('input[type="text"]').atrr('value','human');
Will change the value of attribute "value"

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Продолжайте изучать
тесты по JavaScript
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты