哪种方式比另一方更好,更优先?
两者都使用了两种不同的方法。
使用它们有任何优点或缺点吗?
代码1
https://jsfiddle.net/juw4kbap/225/
Pair part 0:
Alphabet: A
Number: 1
Pair part 1:
Alphabet: K
Alphabet: W
Enter your pair: AB 3F
Pair part 0:
Alphabet: A
Alphabet: B
Pair part 1:
Number: 3
Alphabet: F
VS
代码2
https://jsfiddle.net/juw4kbap/170/
function playAudio(player, button) {
player.volume = 1.0;
player.setAttribute("src", "http://hi5.1980s.fm/;");
player.play();
}