Calculator gr
How do I make an calculator gr?
What is a calculator gr? How do you make a calculator gr? This script and codes were developed by Bozhana on 20 November 2022, Sunday.
Calculator gr - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>calculator gr</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <style type="text/css"> .page-content-bg-repeat.html-editor * { margin: 0 !Important; padding: 0 !Important; }
</style>
<div id="calc-wrapper"> <div id="calc-cont" style="margin: 0 auto !Important;"> <div id="calc-inner"> <div class="vert-algn"> <div class="vert-algn-innr" style="margin: auto 30px !Important; padding: 50px 0 !Important"> <form action="#" id="calculator" style=""> <label class="label" for="petrol" style="margin: 0 0 10px 0 !Important;">ΤΙΜΉ ΒΕΝΖΊΝΑΣ:</label> <input id="petrol" name="pb" placeholder="0.00" required="" style="margin: 0 0 15px 0 !Important; padding: 0 0 0 10px !Important;" type="text" /> <span class="color-ddd"> €.</span> <label class="label" for="lpg" id="lpg" style="margin: 0 0 10px 0 !Important;">ΤΙΜΉ ΥΓΡΑΕΡΊΟΥ:</label> <input id="lpg" name="lpg" placeholder="0.00" style="margin: 0 0 15px 0 !Important; padding: 0 0 0 10px !Important;" type="text" /> <span class="color-ddd"> €</span> <label class="label" for="lpg" id="cng" style="margin: 0 0 10px 0 !Important; ">ΤΙΜΉ ΦΥΣΙΚΟΎ ΑΕΡΊΟΥ:</label> <input name="cng" placeholder="0.00" style="margin: 0 0 15px 0 !Important; padding: 0 0 0 10px !Important;" type="text" /> <span class="color-ddd"> €</span> <label class="label" for="lpg" id="km" style="margin: 0 0 10px 0 !Important;">ΧΙΛΙΌΜΕΤΡΑ ΑΝΑ ΧΡΌΝΟ</label> <input id="km" name="km" placeholder="0" required="" style="margin: 0 0 15px 0 !Important; padding: 0 0 0 10px !Important;" type="text" /> <span class="color-ddd"> χλμ.</span> <label class="label" for="lpg" id="lt" style="margin: 0 0 10px 0 !Important;">ΚΑΤΑΝΆΛΩΣΗ ΒΕΝΖΊΝΑΣ<span style="text-transform: lowercase;"> (λίτρα/100 χλμ.)</span></label> <input name="lt" placeholder="0" required="" style="margin: 0 0 30px 0 !Important; padding: 0 0 0 10px !Important;" type="text" /> </form> <div id="btn-contnr"> <button class="sr-btn sr-btn-light" onclick="outputresultgr()">ΥΠΟΛΟΓΙΣΜΌΣ</button> </div> </div> </div> <div class="vert-algn"> <div class="vert-algn-innr" style="margin: auto 30px !Important; padding: 50px 0 !Important"><img id="fobos-silver-logo" src="/userfiles/editor/image/fobos-logo-silver.png" /> <table id="result-tbl" style="margin: 10px auto!Important;"> <tbody> <tr> <td colspan="3" style="vertical-align: middle; color: #ddd !Important; padding: 0 10px 0 0; text-transform: uppercase;">ΚΑΤΑΝΆΛΩΣΗ</td> </tr> <tr> <td style="vertical-align: middle; color: #ddd !Important; text-align: right; padding: 0 10px 0 0; text-transform: uppercase;">ΒΕΝΖΊΝΑΣ:</td> <td id="cell1" style="border: 1px solid #44658e !Important; vertical-align: middle; padding: 0 0 0 10px !Important; border-top: none !Important;"> </td> <td class="color-ddd" style="vertical-align: middle;">€</td> </tr> <tr> <td style="vertical-align: middle; color: #ddd !Important; text-align: right; padding: 0 10px 0 0; text-transform: uppercase;">ΥΓΡΑΕΡΊΟΥ:</td> <td id="cell2" style="border: 1px solid #44658e !Important; vertical-align: middle;padding: 0 0 0 10px !Important; border-top: none !Important;"> </td> <td class="color-ddd" style="vertical-align: middle;">€</td> </tr> <tr> <td style="vertical-align: middle; color: #ddd !Important; text-align: right; padding: 0 10px 0 0; text-transform: uppercase;">ΦΥΣΙΚΟΎ ΑΕΡΊΟΥ:</td> <td id="cell3" style="border: 1px solid #44658e !Important; vertical-align: middle; padding: 0 0 0 10px !Important; border-top: none !Important;"> </td> <td class="color-ddd" style="vertical-align: middle;">€</td> </tr> </tbody> </table> <div id="result-cont" style=""> <p id="resultgr" style="color: #ddd !Important;font-size: 1.3em; line-height: 26px; margin: 10px 0 0 0 !Important; text-align: center;"> </p> </div> <button class="sr-btn sr-btn-dark" onclick="resetformgr()" style="color:#ddd !Important;">ΕΠΑΝΑΦΟΡΆ</button> </div> </div> </div> </div>
</div>
<script type="text/javascript" src="/skins/skeleton/customer/js/calculator.js"></script> <script src="js/index.js"></script>
</body>
</html>
Calculator gr - Script Codes CSS Codes
/* Calculator styles - Bozhana 02.feb.2016*/ @media only screen and (min-device-width: 320px) and (max-width: 450px) { #result { /*Calculator results*/ line-height: 1; font-size: 16px; } } @media only screen and (max-width: 1024px) and (-webkit-min-device-pixel-ratio: 1) { #calc-cont .vert-algn { /* Calculator */ height: 100%; width: 49%; min-width: 270px; text-align: center; } } @media only screen and (max-width: 935px) and (min-width:220px) { /* Calculator */ #fobos-silver-logo{ display: none; } #calc-cont .vert-algn { display: block; width: 100%; height: 415px; } #btn-contnr { width: 100%; } }
#calc-cont { background: #243e65; width: 63.56%; border-radius: 3px; margin: 0 auto;
}
#calc-inner{ height:100%;
}
#calc-cont .vert-algn { height: 500px; width: 49.78%; min-width: 250px; display: inline-block; vertical-align: top; text-align: center; background: #253e63; background: linear-gradient(to right, #2A4772 0%,#243e65);
}
#calculator .label { display: block; color: #ddd; text-transform: uppercase; font-size: 1.05em; letter-spacing: 0.043em
}
#calculator .color-ddd, #result-tbl .color-ddd { color: #ddd;
}
#calculator{ text-align: left;
}
#calculator input[type="text"] { height: 30px; width: 75%; border-radius: 3px; box-shadow: inset 0px 0px 5px 3px rgba(0, 0, 0, 0.36); border: 1px solid #44658e; border-top: none; background-color: #182437; color: #fbd05d; font-size: 14px ;
}
.sr-btn { margin: 0 auto; height: 35px; background: #ddd; text-transform: uppercase; font-weight: 400; border: none; border-radius: 3px;
}
.sr-btn-light { width: 200px; color: #243e65; font-size: 12px; margin: 0 15%;
}
.sr-btn-dark { margin: 0 37%; width: 120px; color: #ddd; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.7); font-size: 12px; background: #243d62; border: 1px solid #859ead;
}
#result-cont{ height: 90px; /* min-width: 250px; width: 100%; border-radius: 3px; box-shadow: inset 0px 0px 5px 3px rgba(0, 0, 0, 0.36); border: 1px solid #44658e; border-top: none; background-color: #182437; */
}
#result-tbl{ width: 100%; border-spacing: 1px 10px; border-collapse: separate; font-size: 1.05em; letter-spacing: 0.043em;
} #cell1,
#cell2,
#cell3 { width: 75%; height: 30px; border-radius: 3px; box-shadow: inset 0px 0px 5px 3px rgba(0, 0, 0, 0.36); background-color: #182437; color: #fbd05d; font-size: 14px; text-align: left;
}
/* End of calculator styles*/
Calculator gr - Script Codes JS Codes
function outputresult() { var a, b, c, d, forma, km, exp, expl, pet, lpg, cng, slpg, scng; forma = document.getElementById("calculator"); a = forma.elements["pb"].value; b = forma.elements["lpg"].value; c = forma.elements["cng"].value; d = 0.178; km = forma.elements["km"].value; exp = forma.elements["lt"].value; expl = exp / 100 * b * km; pet = a * (exp / 100) * km; lpg = expl * 0.1 + expl; cng = (d * c) * ((exp * 3.2) / 100) * km; slpg = pet - lpg; scng = pet - cng; if (a == 0 || km == 0 || exp == 0) { document.getElementById("result").innerHTML = "<span style='color:#fbd05d;'>" + "Цена бензин, Годишен пробег и Разход на бензин са задължителни полета" + "</span>"; } else if (cng == 0 && lpg == 0) { document.getElementById("result").innerHTML = "<span style='color:#fbd05d;'>" + "Моля добавете цена за литър газ или килограм метан" + "</span>"; } else if (cng == 0) { document.getElementById("result").innerHTML = "За " + "<span style='color:#fbd05d;font-weight: bold;'>" + km + "</span>" + " км вие спестявате " + "<span style='color:#fbd05d; font-weight: bold;'>" + slpg.toFixed(2) + " лв. </span>" + " от газ "; } else if (lpg == 0) { document.getElementById("result").innerHTML = "За " + "<span style='color:#fbd05d;font-weight: bold;'>" + km + "</span>" + " км вие спестявате " + "<span style='color:#fbd05d; font-weight: bold;'>" + scng.toFixed(2) + " лв. </span>" + " от метан "; } else { document.getElementById("result").innerHTML = "За " + "<span style='color:#fbd05d;font-weight: bold;'>" + km + "</span>" + " км вие спестявате " + "<span style='color:#fbd05d; font-weight: bold;'>" + slpg.toFixed(2) + " лв. </span>" + " от газ и " + "<span style='color:#fbd05d; font-weight: bold;'>" + scng.toFixed(2) + " лв. </span>" + " от метан"; } var x = document.getElementById("cell1"); x.innerHTML = pet.toFixed(2); var y = document.getElementById("cell2"); y.innerHTML = lpg.toFixed(2); var z = document.getElementById("cell3"); z.innerHTML = cng.toFixed(2);
}
function outputresultgr() { var a, b, c, d, forma, km, exp, expl, pet, lpg, cng, slpg, scng; forma = document.getElementById("calculator"); a = forma.elements["pb"].value; b = forma.elements["lpg"].value; c = forma.elements["cng"].value; d = 0.178; km = forma.elements["km"].value; exp = forma.elements["lt"].value; expl = exp / 100 * b * km; pet = a * (exp / 100) * km; lpg = expl * 0.1 + expl; cng = (d * c) * ((exp * 3.2) / 100) * km; slpg = pet - lpg; scng = pet - cng; if (a == 0 || km == 0 || exp == 0) { document.getElementById("resultgr").innerHTML = "<span style='color:#fbd05d;'>" + "Η τιμή βενζίνας, τα χιλιόμετρα ανα χρόνο καί η κατανάλωση βενζίνας είναι υποχρεωτικά πεδία." + "</span>"; } else if (cng == 0 && lpg == 0) { document.getElementById("resultgr").innerHTML = "<span style='color:#fbd05d;'>" + "Παρακαλώ συμπληρώστε την τιμή υγραερίου ή του φυσικού αερίου." + "</span>"; } else if (cng == 0) { document.getElementById("resultgr").innerHTML = "Γιά " + "<span style='color:#fbd05d;'>" + km + " χλμ.</span> εσείς εξοικονομείτε " + "<span style='color:#fbd05d;'>" + slpg.toFixed(2) + " € </span>" + " από υγραέριο."; } else if (lpg == 0) { document.getElementById("resultgr").innerHTML = "Γιά " + "<span style='color:#fbd05d;'>" + km + " χλμ.</span> εσείς εξοικονομείτε " + "<span style='color:#fbd05d;'>" + scng.toFixed(2) + " € </span>" + " από φυσικό αέριο."; } else { document.getElementById("resultgr").innerHTML = "Γιά " + "<span style='color:#fbd05d;'>" + km + " χλμ.</span> εσείς εξοικονομείτε " + "<span style='color:#fbd05d;'>" + slpg.toFixed(2) + " € </span>" + " από υγραέριο καί " + "<span style='color:#fbd05d;'>" + scng.toFixed(2) + " € </span>" + " απο φυσικό αέριο"; } var x = document.getElementById("cell1"); x.innerHTML = pet.toFixed(2); var y = document.getElementById("cell2"); y.innerHTML = lpg.toFixed(2); var z = document.getElementById("cell3"); z.innerHTML = cng.toFixed(2);
}
function outputresulten() { var a, b, c, d, forma, km, exp, expl, pet, lpg, cng, slpg, scng; forma = document.getElementById("calculator"); a = forma.elements["pb"].value; b = forma.elements["lpg"].value; c = forma.elements["cng"].value; d = 0.178; km = forma.elements["km"].value; exp = forma.elements["lt"].value; expl = exp / 100 * b * km; pet = a * (exp / 100) * km; lpg = expl * 0.1 + expl; cng = (d * c) * ((exp * 3.2) / 100) * km; slpg = pet - lpg; scng = pet - cng; if (a == 0 || km == 0 || exp == 0) { document.getElementById("resulten").innerHTML = "<span style='color:#fbd05d;'>" + "Petrol cost, Annual kilometers and Petrol consumption are required fields." + "</span>"; } else if (cng == 0 && lpg == 0) { document.getElementById("resulten").innerHTML = "<span style='color:#fbd05d;'>" + "Please add price per liter for LPG or CNG" + "</span>"; } else if (cng == 0) { document.getElementById("resulten").innerHTML = "For " + "<span style='color:#fbd05d;'>" + km + " km</span> you save " + "<span style='color:#fbd05d;'>" + slpg.toFixed(2) + " € </span>" + " by driving with LPG"; } else if (lpg == 0) { document.getElementById("resulten").innerHTML = "For " + "<span style='color:#fbd05d;'>" + km + " km</span> you save " + "<span style='color:#fbd05d;'>" + scng.toFixed(2) + " € </span>" + " by driving with CNG"; } else { document.getElementById("resulten").innerHTML = "For " + "<span style='color:#fbd05d;'>" + km + " km</span> you save " + "<span style='color:#fbd05d;'>" + slpg.toFixed(2) + " € </span>" + " by driving with LPG and " + "<span style='color:#fbd05d;'>" + scng.toFixed(2) + " € </span>" + " with CNG"; } var x = document.getElementById("cell1"); x.innerHTML = pet.toFixed(2); var y = document.getElementById("cell2"); y.innerHTML = lpg.toFixed(2); var z = document.getElementById("cell3"); z.innerHTML = cng.toFixed(2);
}
function resetform() { document.getElementById("calculator").reset(); document.getElementById("result").innerHTML = ""; document.getElementById("cell1").innerHTML = ""; document.getElementById("cell2").innerHTML = ""; document.getElementById("cell3").innerHTML = "";
}
function resetformgr() { document.getElementById("calculator").reset(); document.getElementById("resultgr").innerHTML = ""; document.getElementById("cell1").innerHTML = ""; document.getElementById("cell2").innerHTML = ""; document.getElementById("cell3").innerHTML = "";
}
function resetformen() { document.getElementById("calculator").reset(); document.getElementById("resulten").innerHTML = ""; document.getElementById("cell1").innerHTML = ""; document.getElementById("cell2").innerHTML = ""; document.getElementById("cell3").innerHTML = "";
}
Developer | Bozhana |
Username | mesechina |
Uploaded | November 20, 2022 |
Rating | 3 |
Size | 4,552 Kb |
Views | 10,120 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Software gr | 6,620 Kb |
Terms and conditions gr | 3,422 Kb |
Service intervals | 3,553 Kb |
Downloads | 4,371 Kb |
A Pen by Bozhana | 6,995 Kb |
Prices | 2,989 Kb |
Fobos 6cil | 1,505 Kb |
Pricelist | 4,384 Kb |
Home page boxes | 2,459 Kb |
Trim table | 2,632 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Donut Chart example - MorrisJS | Capelo | 2,385 Kb |
A Pen by Kevin | Kevinkenger | 2,642 Kb |
Project -Show the Local Weather | Luciano_Britis | 2,583 Kb |
Weather App | Kw7oe | 3,162 Kb |
A bit of elegance | Hackthevoid | 9,095 Kb |
Colorful Sliders | Chanrith | 1,246 Kb |
CSS Piano | Dannystyle | 5,138 Kb |
Parallax with only CSS | Thulioph | 2,297 Kb |
Elephants Full screen site | Orrinward | 3,981 Kb |
FreeCodeCamp - Simon Game | Ivhed | 8,481 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!