2013-08-28 38 views
0

我有,我有這種看法的ASP.NET應用程序MVC4:啓動從剃刀視圖中的電子郵件客戶端

@{ 
    Layout = "~/Views/Shared/Template.cshtml"; 
} 
@section logout { 

    <a href='@Url.Action("Logout", "Begin")' style="margin-left: 91.3%"><img src="~/Content/images/images.jpg" style="width:37px; height:37px" /></a> 
    } 
<html> 
<head> 
    <script> 
     function mailJob(code) { 
      window.open('mailto:[email protected]'); 
     } 
    </script> 

    </head> 
    <body> 

<form action="/Pages/Index" method="post" style="margin-left:20%"> 
    <div class ="CenterTitle"> 
     <h1 style="color:rgb(73, 140, 212)">Norm impact : Registre des réclamations clients</h1> 
    </div> 
    <div class="noPrint"> 
     <input type="hidden" value ="1" name="Pages"/> 
       <button type="submit" value="Submit" name="btnPage1"><img src="~/Content/images/OK.png" onclick="mailJob('Sample');"/></button> 
       <button type="button" value="exportToPDF" onclick="window.print()" name="btnPage1"style="margin-left:55%"><img src="~/Content/images/print.png" /></button> 
    </div> 

    ... 

    <div class="noPrint"> 
     <button type="submit" value="Page2" name="btnPage1" style="margin-left:75%"><img src="~/Content/images/next.png" /></button> 
    </div> 
</form> 

</body></html> 

的問題是在mailto因爲郵件軟不推出,但新與此網址的窗口mailto:[email protected]

那麼我該如何解決這個問題呢?

回答

1

試試這個:

function mailJob(code) { 
    window.location.href = 'mailto:[email protected]'; 
} 
+0

它沒有工作,現在沒有窗口打開 –

相關問題