किसी एलिमेंट के बॉर्डर की स्टाइल सेट करने के लिए, जावास्क्रिप्ट में borderStyle प्रॉपर्टी का उपयोग करें।
उदाहरण
जावास्क्रिप्ट के साथ किसी एलिमेंट के बॉर्डर की स्टाइल सेट करना सीखने के लिए निम्न कोड चलाकर देखें:
<!DOCTYPE html> <html> <head> <style> #newDiv { height: 150px; width: 150px; border: 2px solid #000000; } </style> <body> <div id="newDiv"> डेमो कंटेंट! </div> <br> <button type="button" onclick="display()">बॉर्डर स्टाइल बदलें</button> <script> function display() { document.getElementById("newDiv").style.borderStyle = "dashed"; } </script> </body> </html>