ua.html revision 92810c498455dfca3072cc0c6d3a49b3a51e9b4c
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>YUI 3.0</title>
<script src="/build/yui/yui-debug.js"></script>
<base href="http://localhost/src/yui3/sandbox/yui/ua.html" />
<style>
.dd {
padding-left: 20px;
padding: 5px;
margin: 2px;
cursor: move;
background-color: red;
width: 400px;
height: 100px;
zoom: 1;
}
#ddtarg {
top: 200px;
}
</style>
<body>
<input id="addButton" type="button" value="Add link" />
<div id="demo" class="dd"></div>
<div id="ddtarg" class="dd"></div>
<script type="text/javascript">
YUI({ }).use('node', 'dump', function(Y) {
var node = Y.get('#demo');
// var ua = [];
// Y.each(Y.UA, function(v, k) {
// ua[ua.length] = k;
// });
// ua.sort();
node.set('innerHTML', Y.dump(Y.UA));
Y.one('#ddtarg').set('innerHTML', navigator.userAgent);
});
</script>
</body>
</html>