ho provato anche così ma dà errore

codice:
<html>
<head>
<script type="text/javascript">
function funzione()
{
document.write('<OBJECT classid="clsid:1111111"'
+'</OBJECT>');
}
</script>
</head>
<body>
<form>
<input type="button" onclick="funzione()" value="Esegui">
</form>
</body>
</html>