请考虑以下代码段:
console.log( "1st", history.length );
location.hash = location.hash + "some-value";
console.log( "2nd", history.length );
setTimeout( function() {
console.log( "3rd", history.length );
history.back();
console.log( "4th", history.length );
}, 1000 );
Run Code Online (Sandbox Code Playgroud)
https://jsfiddle.net/1kqLofq4/2/
我很好奇为什么更改哈希不是调整历史长度但是使用history.back()需要还原哈希的更改?我已经使用Firefox 46和Chrome 49测试了这种情况.输出总是类似于:
1st 17
2nd 17
3rd 17
4th 17
Run Code Online (Sandbox Code Playgroud)
我已经尝试搜索有关此案例的一些规范或信息,为什么这可能是预期的行为以及如何使用除history.length之外的其他信息来检测历史记录中的更改.但我得到的是使用一些我不感兴趣的花式框架插件的提示.
是否有任何事件可以检查 vuetify 中的数据表分页更改数字?update:pagination数据表的事件如何工作?
这个问题是关于要求对Perl系统中发生的事情进行一些解释,因为我现在编码的时间超过25年并没有隐含地看到这一点.故事来了......
在尝试使用Cyrus::IMAP::AdminPerl5中的实例时,我试图获取并打印一个配额列表,导致返回一些奇怪的结构化数据.
my %quotas = $client->listquota(@list[0]);
if ( $client->error ) {
printf STDERR "Error: " . $client->error . "\n";
exit 1;
}
print "root: " . $list[0] . "\n";
foreach my $quota ( keys %quotas ) {
print( $quota, " ", $quotas{$quota}[0], "/", $quotas{$quota}[1], " KiB\n" );
}
Run Code Online (Sandbox Code Playgroud)
这段代码实际上是通过打印出类似的东西来实现的
root: user.myuser
STORAGE: 123/4567 KiB
Run Code Online (Sandbox Code Playgroud)
此代码取自以下Cyrus::IMAP::Shell类似的读取:
my %quota = $$cyrref->listquota(@nargv);
foreach my $quota (keys %quota) {
$lfh->[1]->print(" ", $quota, " ", $quota{$quota}[0], "/", $quota{$quota}[1]);
if ($quota{$quota}[1]) { …Run Code Online (Sandbox Code Playgroud)