Output document dir in JavaScript

Description

The following code shows how to output document dir.

Example


<!--  w  w w .ja v  a 2s .  co m-->
<!DOCTYPE HTML>
<html>
<body>
<script>

document.writeln("dir: " + document.dir);
</script>
</body>
</html>

Click to view the demo

The code above generates the following result.

Output document dir in JavaScript