You can quickly run HTML in the browser without creating a HTML file:
Enter this in the address bar: data:text/html,<h1>Hello, world!</h1> (This won't work in IE) You can make a page's CSS editable in the browser without using JS:
<!DOCTYPE html>
<html>
<body>
<style style="display:block" contentEditable>
body { color: blue }
</style>
</body>
</html>
(This also won't work in IE)
You can have the browser parse a URL for you like this:
var a = document.createElement('a');
a.href = url;
// any property of window.location works here:
document.write('The hostname of ' + url + ' is ' + a.hostname);
Read more: Quora
0 comments:
Post a Comment