Monday 2 November 2015

Share the URL on a button click through Javascript


Just copy paste the code in Script Editor Webpart or Content editor Webpart.


<script type="text/javascript">

function getUrl(){
var url = window.location.href ;
}

</script>
<a class="email" title="Email a friend" href="#" onclick="javascript:window.location='mailto:?subject=Interesting information&body=I thought you might find this information interesting: ' + window.location;">
  <img src="http://png-2.findicons.com/files/icons/573/must_have/48/mail.png">

</a>

No comments: