我在javascript中有计算,我必须输入我的pdf,我该怎么办?
这是我的javascript
<script>
function hitung(){
var e = (document.getElementById("ifin").value);
var a = (document.getElementById("Furniture").value);
var panjang =(document.getElementById("ipanjang").value);
var ht = 0.0;
var hf = 0.0;
var total = 0.0;
if (e == "hpl") {
hf = 0.0;
}
else if(e == "cat")
{
hf = 0.5;
}
else {
hf = 0.0;
}
if (a == "kitchen"){
ht = 1.7;
}
else if (a == "meja"){
ht = 2.3;
}
else {
ht = 0.0;
}
total = panjang*ht+hf;
document.getElementById("ototal").innerHTML ="Harga Total : Rp."+total.toFixed(2)+"0.000,00"+"<br>Sudah termasuk ongkir";
}
</script>
&#13;
我想将我的总数输入到dompdf,这是我的dompdf脚本
<?php
$nama = str_replace(" ", "_", strtolower($_POST['nama']));
$alamat = $_POST['alamat'];
$email = $_POST['email'];
$total = $_POST['<script>var = total</script>']
require_once("dompdf/dompdf_config.inc.php");
?>
我尝试插入像$total = $_POST['<script>var = total</script>']
一样的总数,但它不起作用
我该怎么办?