كائن إخراج DOM HTML
كائن الإخراج
يمثل كائن الإخراج عنصر <إخراج> HTML.
ملاحظة: عنصر <output> غير مدعوم في Internet Explorer / Edge.
الوصول إلى كائن الإخراج
يمكنك الوصول إلى عنصر <output> باستخدام getElementById ():
مثال
var x = document.getElementById("myOutput");
نصيحة: يمكنك أيضًا الوصول إلى عنصر <output> من خلال البحث في مجموعة عناصر النموذج.
قم بإنشاء كائن الإخراج
يمكنك إنشاء عنصر <output> باستخدام طريقة document.createElement ():
مثال
var x = document.createElement("OUTPUT");
خصائص كائن الإخراج
Property | Description |
---|---|
defaultValue | Sets or returns the default value of an <output> element |
form | Returns a reference to the form that contains the <output> element |
htmlFor | Returns the value of the for attribute of an <output> element |
labels | Returns a list of <label> elements associated with the <output> element |
name | Sets or returns the value of the name attribute of an <output> element |
type | Returns which type of HTML element the Output object represents |
value | Sets or returns the value of an <output> element |
الخصائص القياسية والأحداث
يدعم كائن الإخراج أيضًا الخصائص والأحداث القياسية .
الصفحات ذات الصلة
مرجع HTML: علامة <إخراج> HTML