I'm trying to identify the users device using WURFL. I found this site: http://web.wurfl.io/#learnmore and just did as said in the description:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<script type='text/javascript' src="http://wurfl.io/wurfl.js">
console.log(WURFL);
document.getElementById("output").innerHTML = WURFL.complete_device_name;
</script>
<div class="text" id="output" style="font-size: 3em;"></div>
</body>
</html>
But as I open the file in Firefox/Chrome the console and page contains no content.
Thanks for helping!
PS: The Firefox console displays "The character encoding of my html document is not declared and might be displayed wrong in certain browsers." How can I declare my character encoding?
That's now how to write inline scripts in HTML.
You want this:
A script cannot have both an
src=(which means that it's an external source) or text content (which means it's an inline script). You need two<script>elements.