i have this code:
<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)
时,我得到了正确的值,但是当我通过window.location.href进入新页面时,我想要访问该值...我的表单是“post”方式提交的,当我执行print_r($_POST['message'])
时,我得到一个空数组,请帮忙解决?