<html>
<head>
<link id="link1" rel="stylesheet" type="text/css" media="screen" href="/demo/style1.css">
<script>
function displayResult()
{
var x=document.getElementById("link1").media;
alert(x);
}
</script>
</head>
<body>
<button type="button" onclick="displayResult()">Display media type of link element</button>
</body>
</html>