- The following common input element content attributes, IDL attributes, and methods apply to the element: autocomplete, list, max, min, readonly, required, and step content attributes; list, value, valueAsDate, and valueAsNumber IDL attributes; select(), stepDown(), and stepUp() methods.
- The value IDL attribute is in mode value.
- The input and change events apply.
- The following content attributes must not be specified and do not apply to the element: accept, alt, checked, dirname, formaction, formenctype, formmethod, formnovalidate, formtarget, height, maxlength, minlength, multiple, pattern, placeholder, size, src, and width.
- The following IDL attributes and methods do not apply to the element: checked, files, selectionStart, selectionEnd, and selectionDirection IDL attributes; setRangeText(), and setSelectionRange() methods.
$.ajax({
//…
dataType: 'json'
}).done(function(response){
console.log(response); // посмотрим в консоли, что там
var html ='';
// собираем все ответы в строку
response.forEach(function(msg){ html += msg + '<br>'; });
// выводим на страницу
$('#out').html(html);
});
function pluralize($n, array $forms)
{
return $n % 10 == 1 && $n % 100 != 11
? $forms[0]
: ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? $forms[1] : $forms[2]);
}