Computer >> कंप्यूटर >  >> प्रोग्रामिंग >> Javascript

जावास्क्रिप्ट के साथ कॉलम कैसे भरें?


स्तंभ भरण का प्रयोग करें कॉलम भरने के लिए संपत्ति। क्रमिक रूप से भरने के लिए इसे ऑटो के रूप में भरें, या सामग्री को स्तंभों के बीच समान रूप से विभाजित करने के लिए संतुलित करें।

उदाहरण

आप जावास्क्रिप्ट के साथ भरण कॉलम सेट करने के लिए निम्नलिखित कोड को चलाने का प्रयास कर सकते हैं -

<!DOCTYPE html>
<html>
   <body>
      <p>Click below to create 4 columns</p>
      <button onclick="display()">Columns</button>
      <div id="myID">
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
      </div>
      <script>
         function display() {
            document.getElementById("myID").style.columnCount = "4";
            document.getElementById("myID").style.columnFill = "balance";
         }
      </script>
   </body>
</html>

  1. जावास्क्रिप्ट के साथ क्लिपबोर्ड पर टेक्स्ट कैसे कॉपी करें?

    जावास्क्रिप्ट के साथ टेक्स्ट को क्लिपबोर्ड पर कॉपी करने के लिए निम्नलिखित कोड है - उदाहरण <!DOCTYPE html> <html> <head> <style> button {    border: none;    outline: none;    background-color: rgb(191, 187, 255);    color: black;  

  1. जावास्क्रिप्ट के साथ टेक्स्ट को कैसे टॉगल करें?

    जावास्क्रिप्ट के साथ टेक्स्ट को टॉगल करने के लिए, कोड इस प्रकार है - उदाहरण <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style>    body {       font-family: "Segoe

  1. CSS के साथ कॉलम कैसे भरें

    कॉलम भरने के लिए, कॉलम-फिल प्रॉपर्टी का उपयोग करें। आप बैलेंस फॉर्म के साथ कॉलम-फिल प्रॉपर्टी को लागू करने के लिए निम्न कोड चलाने का प्रयास कर सकते हैं: उदाहरण <!DOCTYPE html> <html>    <head>       <style>          .demo { &n