Я пытаюсь добавить текст, если он не существует в форме, если она существует Donot добавить:JQuery текст Append, если оленья кожа существует
<form method="post" action="" class="horizontal-form">
<fieldset>
<input type="file" align="left" name="patient_image[]" multiple="multiple" min="1" max="6"/>
</fieldset>
</form>
jQuery(function(){
$('form').each(function() {
if ($(this).find('fieldset').html() === '<br/>Total image size is limited to 4MB. If you are uploading more than one image, the total combined size is still 4MB. Files should be formatted into JPG or BMP.') {
$("input[name*='patient_image']").after('<br/>Total image size is limited to 4MB. If you are uploading more than one image, the total combined size is still 4MB. Files should be formatted into JPG or BMP.');
}
});
});
Вот ссылка на скрипке я пытался до сих пор: http://jsfiddle.net/zbpv5zfk/37/
Пожалуйста, ваши Javascript в самом заявлении вопрос, а просьба. – thatidiotguy
Вы делаете это неправильно. Текст Fieldset не то, что вам нужно. Добавьте div с классом, проверьте, что класс существует в наборе полей. Если нет, добавьте его с текстом. – vaso123
@lolka_bolka Я не могу добавить класс к нему, просто нужно добавить, как есть – govindak