我有一个无法工作的简单 js
我需要为每个变量显示相应的值 ie 玩具总动员 3 显示喜剧精彩选择等等
问题似乎出在 if else 语法中
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>help</title>
</head>
<body>
<script type="text/javascript">
var movie = prompt("Select your favorite movie").toLowerCase();
if(movie =="toy story 3","kung fu Panda","RIO");
{
document.write("<p>Comedy splendid choice</p>")
}
else if(movie ="sex in the city","the backup plan","twilight");
{
document.write("<p>Chick flicks are always fun</p>")
}
else if(movie ="fast 5" || movie=="the karate kid");
{
document.write("<p>Action is satisfaction/p>")
}
else
{
document.write("<p>I’m sure it’s a good movie I just don’t know about it/p>")
}
</script>
</body>
</html>