<html>
<body>
<p id="myP">This is an example paragraph.</p>
<button type="button" onclick="myFunction()">Let text flow from right to left</button>
<script>
function myFunction() {
document.getElementById("myP").style.direction = "rtl";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_direction by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 14:06:08 GMT -->
</html>