ยังไงแบบอักษรที่จะปิดการใช้งานเป็น div ในจาวาสคริปต์

รหัสตัวอย่าง

0
0

ยังไงแบบอักษรที่จะปิดการใช้งานเป็น div ในจาวาสคริปต์

// This is the DIV you'd like to disable
// Use the CSS selector to pin dow nthe exact DIV
var div = document.querySelector('div');

// Choose either 1, 2 or 3
// (1) Sets the disabled attribute
div.setAttribute('disabled', true);

// (2) Makes the DIV half transparent
// And changes the cursor to a "not allowed" symbol
div.style.opacity = '0.5';
div.style.cursor = 'not-allowed';

// (3) Delete the DIV
div.remove();

หน้าคล้ายกัน

คล้ายกันหน้ากับตัวอย่าง

ในภาษาอื่นๆ

หน้านี้อยู่ในภาษาอื่นๆ

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................