<html>
|
<head>
|
|
</head>
|
<body>
|
<input type=text id=t></input>
|
<embed id=pdf-viewer type='application/x-google-chrome-print-preview-pdf' src=test.pdf></embed>
|
|
<script>
|
i = 0;
|
document.addEventListener('readystatechange', function() {
|
|
if (i == 1)
|
{
|
document.body.appendChild(document.getElementById('pdf-viewer'));
|
document.getElementById('t').focus();
|
}
|
else
|
{
|
alert('hi');
|
}
|
i++;
|
});
|
|
window.addEventListener('DOMContentLoaded', function() {
|
|
document.body.removeChild(document.getElementById('pdf-viewer'));
|
});
|
|
</script>
|
</body>
|
</html>
|