خاصية ربط الوسائط
مثال
قم بإعادة نوع الوسائط الذي يهدف عنصر الارتباط من أجله:
var x = document.getElementById("myLink").media;
التعريف والاستخدام
تقوم خاصية الوسائط بتعيين أو إرجاع نوع الوسائط لعنصر الارتباط.
نوع الوسائط مهم لمعلومات النمط. قد يكون النمط مختلفًا لأجهزة الكمبيوتر والأجهزة المحمولة.
دعم المتصفح
Property | |||||
---|---|---|---|---|---|
media | Yes | Yes | Yes | Yes | Yes |
بناء الجملة
أعد خاصية الوسائط:
linkObject.media
قم بتعيين خاصية الوسائط:
linkObject.media = device
قيم الملكية
Value | Description |
---|---|
all | For all devices. This is default |
aural | For speech synthesizers |
braille | For Braille tactile feedback devices |
embossed | For paged Braille printers |
handheld | For handheld devices |
For printed pages and print preview | |
projection | For projectors or transparencies |
screen | For color computer screens |
speech | For speech synthesizers |
tty | For teletype devices |
tv | For TV-type devices |
تفاصيل تقنية
قيمة الإرجاع: | سلسلة ، تمثل قائمة مفصولة بفواصل لأنواع الوسائط |
---|
مزيد من الأمثلة
مثال
تغيير نوع الوسائط:
document.getElementById("myLink").media = "all";
الصفحات ذات الصلة
مرجع HTML: سمة وسائط HTML <link>
❮ رابط الكائن