Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div class="CalcPrice">
<form action="" onchange="calcPrice()" style="padding-top: 20px;">

<label> ширина </label><br>
 <input id="a" type="number"><br>
<label> высота </label><br>
  <input id="b" type="number"><br>
<label> количество </label><br>
  <input id="q" type="number"><br>
  <input required placeholder="результат" id="rezultat" type="text" disabled>
  <select id="selector-32" data-options="400" data-option="0" data-name="Обработка краев" class=newSelect>
    <option  value="0" data-option="0" data-desc="Описание">без обточки</option>
    <option value="50" data-option="1" data-desc="Описание">0,5 см обточка</option>
    <option value="140" data-option="2" data-desc="Описание">1 см обточка</option>
    <option value="280" data-option="3" data-desc="">2 см обточка</option>

  <select id="selector-30" data-options="400" data-option="0" data-name="пескоструйный рисунок" class="newSelect">
    <option value="0" data-option="0" data-desc="Описание">без пескоструя</option>
    <option value="1500" data-option="1" data-desc="Описание">пескоструйный рисунок</option>
    <option value="1000" data-option="2" data-desc="Описание">пескоструйные полосы</option>
    <option value="500" data-option="3" data-desc="">заматирование</option>
<div class="deli">
  <input type="checkbox" id="d" name="scales" class="del"><label>Доставка</label>
</ div>



  margin:0 auto;
  border: 1px solid #000;
  width: 250px;
  justify-content: center;
  text-align: center;
  height: 280px;
  background: #1221;
  font-family: sans-serif;
  font-size: 12px;
  vertical-align: middle;

border-radius: 2px;
    background: transparent;
    height: 34px;
    padding: 5px;
    border: 1;
  width: 200px;
  margin-top: 5px;

  background: #1222;
  margin:0 auto;
  text-align: center;
  width: 190px;
  height: 20px;
  padding: 5px;
  border: 1px solid #000;
  margin-top: 5px;

  margin-top: ;
  vertical-align: middle;
    width: 15px;
    height: 15px;


                function calcPrice () {
   let firstInp = Number(document.querySelector('#a').value); 
   let secondInp = Number(document.querySelector('#b').value);
   let thirdInp = Number(document.querySelector('#q').value);
   let fourthdInp = Number(document.querySelector('#d').value);
   var delivery = 500; //доставка по городу
   var mirror = 660;// сумма за квадрат зеркала
   var meter = 140; // сумма за пог.метр обработки краев зеркала(периметр) 
                    //  формула: (ширина+ширина * высота+высота) (a+2*b+2)*140   
   var e = document.getElementById("selector-32");
   var obtochka = Number(e.options[e.selectedIndex].value);
  var d = document.querySelector('#d').checked ? 500 : 0;
   var delivery = Number(document.querySelector('#d').value);
   var resultat1 = ((firstInp + secondInp) * 2 * obtochka)+d; 
   var p = document.getElementById("selector-30");
   var picture = Number(p.options[p.selectedIndex].value);
    var quantity = Number(document.querySelector('#q').value);
    var q = quantity;
    var resultat1 = ((firstInp + secondInp) * 2 * obtochka)*q+d;
   if (obtochka) {
   	resultat1 = ((firstInp + secondInp) * 2 * obtochka)*q+d;
  let rezultat = resultat1  + ((firstInp * secondInp) * mirror)*q;
  var resultat2 = ((firstInp * secondInp) * picture)*q;
  if (picture) {
  let resultat = resultat2 + resultat1 + ((firstInp * secondInp) * mirror); 
  if (quantity) {
    let resultat = (resultat2 + resultat1) + ((firstInp * secondInp) * mirror) * q;
   if (firstInp !== 0 && secondInp !== 0) {
     let rezultat = (resultat2 + resultat1)  + ((firstInp * secondInp) * mirror) * q;
      document.getElementById('rezultat').value = `${rezultat} СОМ`;
   }else if(obtochka==0){
     document.getElementById('rezultat').value = mirror
     document.getElementById('rezultat').value = '';