|
|
Модератор форума: JonMagon |
Сообщество uCoz » Вебмастеру » JavaScript, Flash и прочие технологии » JavaScript » Перестал работать скрипт?! (Простой скрипт калькулятора, работал месяц, сейчас перестал.) |
Перестал работать скрипт?! |
Всем привет, писал простой скрипт для расчета "замены уплотнителя окна", без проблем работал около месяца, изменений на сайте не происходило и сейчас не работает... Сам скрипт, проще некуда и в dreamweavere все работает...
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>calc</title> <script language="JavaScript"> function raschet() { pm.value=(shir.value-(-1)*vis.value)*4/1000; cena.value=parseInt(pm.value*stvorki.value); } </script> </head> <body> <table border="0" cellpadding="5" cellspacing="0" style="width: 100%; font-size: 13px; align="> <tbody> <tr> <td><input id="shir" style="width:185px; height:20px; font-size: 10pt;" /></td> <td style="width: 90%; font-size: 13px; text-align: left;">Ширена створки мм.</td> </tr> <tr> <td><input id="vis" style="width:185px; height:20px; font-size: 10pt;" /></td> <td style="font-size: 13px; text-align: left;">Высота створки мм.</td> </tr> <tr> <td><select id="stvorki" name="stvorki" style="width:190px; height:25px; font-size: 10pt;"><option value="150">1-3 створки - 150 руб./п.м.</option><option value="120">4-5 створок - 120 руб./п.м.</option><option value="100">Более 5 - 100 руб./п.м.</option> </select></td> <td style="font-size: 13px; text-align: left;">Сколько у Вас створок?</td> </tr> <tr> <td><input onclick="raschet()" style="width:150px; height:25px; font-size: 10pt;" td="" type="button" value=" Расчитать " /></td> <td> </td> </tr> <tr> <td><input id="pm" size="38" style="width:185px; height:25px; font-size: 10pt;" /></td> <td style="font-size: 13px; text-align: left;">Погонные метры</td> </tr> <tr> <td><span style="line-height: 20.7999992370605px;"><input id="cena" size="38" style="width:185px; height:25px; font-size: 10pt;" /></span></td> <td style="font-size: 13px; text-align: left;">Руб./створка</td> </tr> </tbody> </table> </body> </html> |
<html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>calc</title> <script language="JavaScript"> function raschet() { pm.value=(shir.value-(-1)*vis.value)*4/1000; cena.value=parseInt(pm.value*stvorki.value); } </script> </head> <body> <table border="0" cellpadding="5" cellspacing="0" style="width: 100%; font-size: 13px; align="> <tbody> <tr> <td><input id="shir" style="width:185px; height:20px; font-size: 10pt;" /></td> <td style="width: 90%; font-size: 13px; text-align: left;">Ширена створки мм.</td> </tr> <tr> <td><input id="vis" style="width:185px; height:20px; font-size: 10pt;" /></td> <td style="font-size: 13px; text-align: left;">Высота створки мм.</td> </tr> <tr> <td><select id="stvorki" name="stvorki" style="width:190px; height:25px; font-size: 10pt;"><option value="150">1-3 створки - 150 руб./п.м.</option><option value="120">4-5 створок - 120 руб./п.м.</option><option value="100">Более 5 - 100 руб./п.м.</option> </select></td> <td style="font-size: 13px; text-align: left;">Сколько у Вас створок?</td> </tr> <tr> <td><input onclick="raschet()" style="width:150px; height:25px; font-size: 10pt;" td="" type="button" value=" Расчитать " /></td> <td> </td> </tr> <tr> <td><input id="pm" size="38" style="width:185px; height:25px; font-size: 10pt;" /></td> <td style="font-size: 13px; text-align: left;">Погонные метры</td> </tr> <tr> <td><span style="line-height: 20.7999992370605px;"><input id="cena" size="38" style="width:185px; height:25px; font-size: 10pt;" /></span></td> <td style="font-size: 13px; text-align: left;">Руб./створка</td> </tr> </tbody> </table> </body> </html> Красное удали. Хотя, по-моему не работает не из-за этого... Сообщение отредактировал Komoff - Вторник, 20 Окт 2015, 15:47:48
|
| |||
| |||