<!DOCTYPE html>
<html>
<body>
<p id="demo">这是示例段落。</p>
<button type="button" onclick="myFunction()">让文本从右向左流动</button>
<script>
function myFunction() {
document.getElementById("demo").style.direction = "rtl";
}
</script>
</body>
</html>