我有這樣的代碼:
<div id="messageDiv">
<form>
<textarea name="message" rows="10" cols="20" id="message"></textarea></textarea>
<br /><br />
<input type="submit" value="Send" onClick="return sendmail()">
<input type="reset" value="Reset" name='reset'>
</form>
</div>
的話,我有我的JS:
function sendmail()
{
var mail = document.getElementById('message').value;
window.location.href = "http://www.rainbowcode.net/apps_dev.php/profiles/mail?id="+mailid;
return false;
}
當我alert(mail)
我得到正確的值,但是當我得到通過窗口我的新的一頁.location.href我想要訪問該值...我的表單是一個「後」當我做一個print_r($_POST['message'])
我得到一個空陣列..請幫助?
謝謝修復它... – 2011-05-23 09:20:36
看到我的更新,這應該解決您的問題 – Ibu 2011-05-23 09:21:38
發送數據通過後您需要指定它作爲屬性,方法和行動@Helloise – Ibu 2011-05-23 09:58:19