- Автор темы
 - #1
 
Я тут начал изучать DOM API, так вот не пойму почему не работает следующий код:
	
	
	
		
Хочу скриптом добавить кнопку скриптом, а JavaScript выводит ошибку
uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMHTMLDocument.appendChild]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame ::
	
		
			
		
		
	
				
			
		Код:
	
	<script>
document.appendChild(HTMLInputElement);
</script>
	uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMHTMLDocument.appendChild]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame ::