jQuery: имитация клика на < тип ввода = & ldquo; файл & rdquo; / > не работает в Firefox? [Дубликат]

После того, что вы начали, повторяя в списке целых чисел, но не считая или удаляя элементы, попробуйте просто проверить, был ли элемент уже просмотрен, добавьте его в список дублированных элементов:

def checkio(data):
    elements = []
    duplicates = []
    for i in data:
        if i not in elements:
            elements.append(i)
        else:
            if i not in duplicates:
                duplicates.append(i)
    return duplicates

d = [1, 3, 1, 2, 3, 5, 8, 1, 5, 2]

print (checkio(d))
#[1, 3, 5, 2]
30
задан Community 23 May 2017 в 11:58
поделиться

1 ответ

Is there a way to get this working in FF?

No, and it doesn't work in most common versions of IE, either. IE will open the dialog, but once you've selected a file with it the form won't actually submit.

Abandon hope. The only way to fake a file upload box is using the transparency technique, and that's really not recommended at all as browsers may lay out file upload boxes differently internally (or even provide a file upload control that doesn't include a Browse dialogue), making it highly likely you'll end up with an inoperable form.

Learn to love the grey file upload field, or use progressive enhancement to replace it with Flash where available.

34
ответ дан 27 November 2019 в 23:49
поделиться
Другие вопросы по тегам:

Похожие вопросы: