0
<script>
function sendMail() {
debugger;
var link = 'mailto:[email protected]'
+ document.getElementById('Email').value
+ '&body=' + document.getElementById('Email').value;
window.location.href = link;
}
</script>
上面的代碼是我發送我想在JavaScript發送郵件的移動應用程序,但它不工作
<form>
<div class="input-main">
<span class="glyphicon glyphicon-user" aria-hidden="true"> </span>
<input type="text" value="Name" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Name';}">
</div>
<div class="input-main">
<span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>
<input type="text" value="Email" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Email';}">
</div>
<div class="input-main">
<span class="glyphicon glyphicon-phone" aria-hidden="true"></span>
<input type="text" value="Phone" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Phone';}">
</div>
<textarea onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Messages';}">Messages</textarea>
<input type="submit"id="Email" onclick="sendMail()" value="Send">
</form>
此功能可以code.I正在使用JavaScript和HTML 3東西我送......在上述程序
- 名稱
- 電子郵件
- 電話號碼
我想用JavaScript發送移動應用程序的郵件,但它不起作用。請提出一些解決方案。
檢查瀏覽器控制檯(F12),看看生成什麼樣的錯誤消息。這可能會告訴你發生了什麼事。 – Dummy