我正在尝试为我们的金融服务登陆页面编写自定义幻灯片计算器,就像本页面上的那个(www.advancedcommission.com)。这就是我写的:
<!DOCTYPE html>
<html>
<head>
<meta charset=”UTF-8”>
<title> My Web Document</title>
<script> function feeCalculate(slider){ if slider <=3000;
var fee = 360;
else;
var fee = slider *.12; slideval.innerHTML = "$" + slider; }
</script>
</head>
<body>
<h2>Advance Amount</h2> Advance Amount: <input type="range" mine = "1000" max = "25000" value="0" step = "500" onchange ="feeCalculate(this.value)" style="width:400px;">
<span id="slideval">$1000</span> <h2>Fee: <span id="fee"></span><h2> </body>
</html>
我将此代码粘贴到Unbounce(我们的目标网页应用程序)中,但它无效。 javascript是否必须与HTML分开?
答案 0 :(得分:1)