我創建了這個聯繫表單,它在firefox和chrome中完美工作,但在Internet Explorer中它不會允許您輸入文本(單擊表單字段不做任何事情)提交按鈕可以工作,但只能發送一個空白的信息,因爲沒有文字可以輸入。另外,當你按提交它試圖打開firefox頁面mail.php,我只在本地測試我的電腦可以這是問題嗎?PHP窗體不能在Internet Explorer中工作
PHP是這樣的:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$formcontent="This message has been generated from the Contact page \n Name: $name \n Phone: $phone \n Email: $email \n Message: $message";
$recipient = "[email protected]";
$subject = "Enquiry From contact page";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
header('Location: ../contact2.html');
?>
HTML是:
<form id="form1" action="PHP/mail.php" method="post">
<label>Name <span class="small">Add your name</span></label>
<input type="text" name="name"><br>
<label>Email <span class="small">Enter a Valid Email</span></label>
<input type="text" name="email"><br>
<label>Phone <span class="small">Add a Phone Number</span></label>
<input type="text" name="phone"><br>
<br>
<br>
<label>Message <span class="small">Type Your Message</span></label>
<textarea name="message" rows="6" cols="25">
</textarea><br>
<button type="submit" value="Send" style="margin-top:15px;">Submit</button>
<div class="spacer"></div>
</form>
有一些JavaScript相關的,我想? – itachi
您需要提供更多信息,即:任何可以禁用元素的JS。然而,在切線上,你確實應該/>那些投入。 –
你試過做''? IE瀏覽器有一些bug,按鈕元素 – arma