源代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>享学课堂</title> </head> <body> <h2>JavaScript 右移位</h2> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = 5 >>> 1; </script> </body> </html>
运行结果