{"id":18,"date":"2024-03-25T09:57:31","date_gmt":"2024-03-25T09:57:31","guid":{"rendered":"https:\/\/calcuconvertonline.com\/?page_id=18"},"modified":"2024-04-03T11:38:04","modified_gmt":"2024-04-03T11:38:04","slug":"area-unit-calculator","status":"publish","type":"page","link":"https:\/\/calcuconvertonline.com\/index.php\/area-unit-calculator\/","title":{"rendered":"Area Unit Calculator"},"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>Area Converter<\/title>\n\n    <!-- Bootstrap CSS -->\n    <link href=\"https:\/\/maxcdn.bootstrapcdn.com\/bootstrap\/4.0.0\/css\/bootstrap.min.css\" rel=\"stylesheet\">\n\n    <!-- Custom CSS -->\n    <style>\n        body {\n            background-color: #f8f9fa;\n        }\n\n        .container {\n            margin-top: 50px;\n        }\n\n        .result {\n            font-size: 20px;\n            font-weight: bold;\n            margin-top: 20px;\n        }\n    <\/style>\n<\/head>\n<body>\n\n<div class=\"container\">\n    <h1 class=\"text-center\">Area Converter<\/h1>\n\n    <div class=\"form-group\">\n        <label for=\"inputArea\">Enter Area:<\/label>\n        <input type=\"number\" class=\"form-control\" id=\"inputArea\" placeholder=\"Enter area\">\n    <\/div>\n\n    <div class=\"form-group\">\n        <label for=\"selectInputUnit\">Select Input Unit:<\/label>\n        <select class=\"form-control\" id=\"selectInputUnit\">\n            <!-- Add other units as needed -->\n            <option value=\"squareMeters\">Square Meters (m\u00b2)<\/option>\n            <option value=\"squareKilometers\">Square Kilometers (km\u00b2)<\/option>\n            <option value=\"squareCentimeters\">Square Centimeters (cm\u00b2)<\/option>\n            <option value=\"squareMillimeters\">Square Millimeters (mm\u00b2)<\/option>\n            <option value=\"squareInches\">Square Inches (in\u00b2)<\/option>\n            <option value=\"squareFeet\">Square Feet (ft\u00b2)<\/option>\n            <option value=\"squareYards\">Square Yards (yd\u00b2)<\/option>\n            <option value=\"acres\">Acres<\/option>\n            <option value=\"hectares\">Hectares<\/option>\n        <\/select>\n    <\/div>\n\n    <div class=\"form-group\">\n        <label for=\"selectOutputUnit\">Select Output Unit:<\/label>\n        <select class=\"form-control\" id=\"selectOutputUnit\">\n            <!-- Add other units as needed -->\n            <option value=\"squareMeters\">Square Meters (m\u00b2)<\/option>\n            <option value=\"squareKilometers\">Square Kilometers (km\u00b2)<\/option>\n            <option value=\"squareCentimeters\">Square Centimeters (cm\u00b2)<\/option>\n            <option value=\"squareMillimeters\">Square Millimeters (mm\u00b2)<\/option>\n            <option value=\"squareInches\">Square Inches (in\u00b2)<\/option>\n            <option value=\"squareFeet\">Square Feet (ft\u00b2)<\/option>\n            <option value=\"squareYards\">Square Yards (yd\u00b2)<\/option>\n            <option value=\"acres\">Acres<\/option>\n            <option value=\"hectares\">Hectares<\/option>\n        <\/select>\n    <\/div>\n\n    <button class=\"btn btn-primary\" onclick=\"convertArea()\">Convert<\/button>\n\n    <div class=\"result\" id=\"result\"><\/div>\n<\/div>\n\n<!-- Bootstrap JS and Popper.js (required for Bootstrap) -->\n<script src=\"https:\/\/code.jquery.com\/jquery-3.2.1.slim.min.js\"><\/script>\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/popper.js\/1.12.9\/umd\/popper.min.js\"><\/script>\n<script src=\"https:\/\/maxcdn.bootstrapcdn.com\/bootstrap\/4.0.0\/js\/bootstrap.min.js\"><\/script>\n\n<script>\n    function convertArea() {\n        const inputArea = parseFloat(document.getElementById('inputArea').value);\n        const selectInputUnit = document.getElementById('selectInputUnit').value;\n        const selectOutputUnit = document.getElementById('selectOutputUnit').value;\n        let result;\n\n        \/\/ Conversion factors\n        const conversionFactors = {\n            squareMeters: 1,\n            squareKilometers: 1e-6,\n            squareCentimeters: 1e4,\n            squareMillimeters: 1e6,\n            squareInches: 1550.0031,\n            squareFeet: 10.7639,\n            squareYards: 1.19599,\n            acres: 0.000247105,\n            hectares: 1e-4,\n        };\n\n        \/\/ Perform conversion\n        result = (inputArea * conversionFactors[selectOutputUnit] \/ conversionFactors[selectInputUnit]).toFixed(6) + ' ' + selectOutputUnit;\n\n        document.getElementById('result').innerText = result;\n    }\n<\/script>\n\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>Area Converter Area Converter Enter Area: Select Input Unit: Square Meters (m\u00b2)Square Kilometers (km\u00b2)Square Centimeters (cm\u00b2)Square Millimeters (mm\u00b2)Square Inches (in\u00b2)Square Feet (ft\u00b2)Square Yards (yd\u00b2)AcresHectares Select Output Unit: Square Meters (m\u00b2)Square Kilometers (km\u00b2)Square Centimeters (cm\u00b2)Square Millimeters (mm\u00b2)Square Inches (in\u00b2)Square Feet (ft\u00b2)Square Yards (yd\u00b2)AcresHectares Convert<\/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-18","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/pages\/18","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=18"}],"version-history":[{"count":1,"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/pages\/18\/revisions"}],"predecessor-version":[{"id":19,"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/pages\/18\/revisions\/19"}],"wp:attachment":[{"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/media?parent=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}