//form.html
<html>
<head>
<meta charset="utf-8">
<title>菜鳥教程(runoob.com)</title>
</head>
<body>
<form action="welcome.php" method="post">
名字: <input type="text" name="fname">
年齡: <input type="text" name="age">
<input type="submit" value="提交">
</form>
</body>
</html>
//welcome.php
<?php?
header("content-type:text/html;charset=utf-8");
$name=$_POST['fname'];
$age=$_POST['age'] ;
echo $name;
echo? $age;?
?>
這兩段代碼在IE、google 瀏覽器中能正常運行,但在360瀏覽器中不能,是為什么。
360瀏覽器F12檢查一下,是兼容性問題,為360瀏覽器上獨立寫一套能正常顯示的代碼,然后2者比較差異?然后你就知道為什么了,然后你就積累了兼容性的經(jīng)驗。