1
您能否帮我解决我的问题。我已经使用了javaScript window.crypto.getRandomvalues函数可以在所有浏览器中使用Safari Safari浏览器和Safari浏览器5.1.7版本。请找到我的代码javaScript window.crypto.getRandomvalues在Safari浏览器中无法正常工作
if ("crypto" in window && "getRandomValues" in crypto)
rand = crypto.getRandomValues(new Uint8Array(1))[0] % 16|0;
else rand = Math.random() * 16 | 0;
return hexs[i === 19 ? rand & 0x3 | 0x8 : rand];
})
请找到屏幕截图。这是我的错误: [截图] [1]基于该documentation herehttp://i.stack.imgur.com/Z1aYk.png
谢谢rahman它工作正常 –