mailto用法
mailto用法
1)基本用法
 <a href=mailto:sample@163.com>send email</a>
<a href=mailto:sample@163.com>send email</a>
或者
 <form action="mailto:sample@163.com">
<form action="mailto:sample@163.com">



 </form>
</form>mailto后跟的是收信人。
可使用参数列表
| to | 收信人 | 
| suject | 主题 | 
| cc | 抄送 | 
| bcc | 暗抄送 | 
| body | 内容 | 
参数传递方式同页面之间传递值一样,可以使用查询字符串,也可以用form
querystring方式:
 <a href="mailto:sample@163.com?subject=test&cc=sample@hotmail.com&body=use mailto sample">send mail</a>
<a href="mailto:sample@163.com?subject=test&cc=sample@hotmail.com&body=use mailto sample">send mail</a>form方式
 <form name='sendmail' action='mailto:sample@163.com'>
<form name='sendmail' action='mailto:sample@163.com'> <input name='cc' type='text' value='sample@hotmail.com'>
<input name='cc' type='text' value='sample@hotmail.com'> <input name='subject' type='text' value='test'>
<input name='subject' type='text' value='test'> <input name='body' type='text' value='use mailto sample'>
<input name='body' type='text' value='use mailto sample'> </form>
</form>两种方式同样传递所有参数。
用subject参数中文会出现乱码。。需要做一些后台判断。
    学透前端行业所有技术,玩遍北京周边所有城市。然后我会回到那个生我养我的地方,因为有亲人的地方才是家。
 
                     
                    
                 
                    
                 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号