JavaScript DHTML/Node Operation/type

Материал из Web эксперт
Версия от 07:25, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"type" Example

    
<html>
<body>
<script language="JavaScript">
function function1(){
   var newN = document.createElement("input");
   newN.type = "text";
   myForm.appendChild(newN);
   newN.innerText="Testing";
}
</script>
<form id="myForm">
    <button onclick="function1();" type="button">Add Text Input</button>
</form>
</body>
</html>