使用Google Chrome时,我的结帐页面上的信用卡文本框未显示选择现有信用卡的正常功能。我确实设置了#34;自动完成类型"正如Google推荐的那样
这是由于长期的#asp;"样式id字段?
jQuery( document ).ready(function($) {
var lastScrollTop = 0;
$(window).scroll(function () {
var scroll = $(window).scrollTop();
var isUp = scroll<lastScrollTop;
console.log(isUp)
if (isUp){
if (scroll <= 275) {
console.log('hi')
$('body').addClass('moving-down');
//$suvNavIcons.fadeOut();
}else{
$('body').removeClass('moving-down');
}
}
lastScrollTop = scroll;
});
答案 0 :(得分:3)
它工作正常,但你需要信用卡上的名称作为第一个输入字段,chrome使用它来自动完成其余的输入。除了Point from Stack overflow which helped:
• By design domain names must have at least two dots otherwise browser will say they are invalid.
• Explicit setting domain cookie on localhost doesn't work for chrome.
• You can only set domain cookies for registry controlled domains, i.e. something ending in .com or so, but not IPs or intranet hostnames like localhost
之外,还可以使用autocomplete
来支持其他版本的chrome。
x-autocompletetype
请参阅我的jsfiddle:https://jsfiddle.net/c3ck1uxc/1/