javascript
1<!DOCTYPE html> 2<html lang="ja"> 3<head> 4<title>おみくじ</title> 5 6</head> 7<body> 8<h1>おみくじ</h1> 9<input type=button value="おみくじスタート" onclick="onButtonClick()"> 10<div id="dsp"></div> 11 12 <script> 13 let kujis =["大吉","吉","中吉","小吉","末吉","凶","大凶"]; 14 let kuji = Math.floor(Math.random()*kujis.length); 15 let disp = document.getElementById("dsp"); 16 dsp.style.color="red"; 17 setInterval("dsp.style.opacity^=2,1000"); 18 19 function onButtonClick(){ 20 dsp.innerHTML = kujis[kuji]; 21 } 22 23 </script> 24 25</body> 26</html>
setInterval("dsp.style.opacity^=2,1000");
の opacity^=2 が理解できません。