Как я могу передать все, что является датой или номером? [Дубликат]

Вы можете попробовать

$('div').hover(
    function() {
        $(this).attr('data-width', $(this).width());
        $(this).attr('data-height', $(this).height());
        $(this).stop().css({'zIndex':'5'}).animate({
            height : $(this).children().css('height'),
            width : $(this).children().css('width')
        }, speed);
        $(this).children().animate({
            left : '0',
            top : '0'
        }, speed);
    },
    function() {
        var w = $(this).attr('data-width');
        var h = $(this).attr('data-height')
        $(this).stop().css({'zIndex':'0'}).animate({
            height : h,
            width : w
        }, speed);
        $(this).children().animate({
            left : left[i],
            top : top[i]
        }, speed);
    }
);

DEMO.

1
задан helcode 13 July 2018 в 01:10
поделиться

1 ответ

match() должен получить строку, ячейка C4 создает Number, следовательно, ошибку.

Измените эту строку,

var status = row[emailColumnNumber].match(myPattern);

В следующем следует исправить TypeError

Обратите внимание на .toString() перед .match()

var status = row[emailColumnNumber].toString().match(myPattern);

2
ответ дан helcode 15 August 2018 в 21:45
поделиться
Другие вопросы по тегам:

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