{"id":24,"date":"2024-03-25T10:00:20","date_gmt":"2024-03-25T10:00:20","guid":{"rendered":"https:\/\/calcuconvertonline.com\/?page_id=24"},"modified":"2024-03-25T10:00:22","modified_gmt":"2024-03-25T10:00:22","slug":"word-character-counter","status":"publish","type":"page","link":"https:\/\/calcuconvertonline.com\/index.php\/word-character-counter\/","title":{"rendered":"Word &amp; Character Counter"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>Word &#038; Character Counter<\/title>\n  <link rel=\"stylesheet\" href=\"https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.5.2\/css\/bootstrap.min.css\">\n  <style>\n    body {\n      font-family: Arial, sans-serif;\n      background-color: #f0f0f0;\n    }\n\n    .container {\n      text-align: center;\n    }\n\n    .result {\n      background-color: #e9ecef;\n      padding: 15px;\n      border-radius: 5px;\n      margin-top: 20px;\n    }\n\n    .result p {\n      margin-bottom: 5px;\n    }\n  <\/style>\n<\/head>\n<body>\n  <div class=\"container mt-5\">\n    <h1>Word &#038; Character Counter<\/h1>\n    <textarea id=\"text-input\" class=\"form-control mb-3\" rows=\"8\" placeholder=\"Enter your text here...\"><\/textarea>\n    <div class=\"result\">\n      <p>Words: <span id=\"word-count\">0<\/span><\/p>\n      <p>Characters: <span id=\"char-count\">0<\/span><\/p>\n    <\/div>\n  <\/div>\n\n  <script>\n    document.getElementById('text-input').addEventListener('input', function() {\n      const text = this.value;\n      const wordCount = countWords(text);\n      const charCount = text.length;\n\n      document.getElementById('word-count').textContent = wordCount;\n      document.getElementById('char-count').textContent = charCount;\n    });\n\n    function countWords(text) {\n      const words = text.trim().split(\/\\s+\/);\n      return words.filter(word => word !== '').length;\n    }\n  <\/script>\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>Word &#038; Character Counter Word &#038; Character Counter Words: 0 Characters: 0<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-24","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/pages\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/comments?post=24"}],"version-history":[{"count":1,"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/pages\/24\/revisions"}],"predecessor-version":[{"id":25,"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/pages\/24\/revisions\/25"}],"wp:attachment":[{"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/media?parent=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}