<!DOCTYPE html>
<html lang = 'en'>
<head>
<meta charset = 'UTF-8'>
<meta http-equiv = 'X-UA-Compatible' content = 'IE=edge'>
<meta name = 'viewport' content = 'width=device-width, initial-scale=1.0'>
<title>BMW</title>
</head>
<body>
<h2><? echo '宝马轿跑BMW好车'?></h2>
<ol>
<? foreach ( $cars as $car ):?>
<li style = 'color:red'>
<a href = ''><? echo $car?></a>
</li>
<?endforeach?>
</ol>
<script type = 'text/javascript'>
let cars = ['宝马3GT xDrive 330li 耀石灰', '宝马X5 xDrive30i x', '宝马750li xdrive v8 M'];
for ( let i = 0; i < cars.length; i++ ) {
alert( cars[i] );
}
</script>
</body>
</html>