No need for jQuery. And it isn’t necessary to open a new window. Protocols which doesn’t return HTTP data to the browser (mailto:
, irc://
, magnet:
, ftp://
(<- it depends how it is implemented, normally the browser has an FTP client built in)) can be queried in the same window without losing the current content. In your case:
function redirect() { window.location.href = "mailto:[email protected]"; } <body onload="javascript: redirect();">
Or just directly
<body onload="javascript: window.location.href='mailto:[email protected]';">
Related Posts:
- mailto using javascript
- Mailto using Javascript?
- mailto using javascript
- Edit webpage with javascript trick – how to “unedit”?
- Automatically pausing html5 video as the ‘next’ button is pressed (javascript/ jquery)
- Is it possible to write data to file using only JavaScript?
- Remove CSS class from element with JavaScript (no jQuery) [duplicate]
- Is it possible to write data to file using only JavaScript?
- How to make JavaScript execute after page load?
- Set cookie and get cookie with JavaScript
- Which is better: or
- Onclick javascript to make browser go back to previous page?
- How to make JavaScript execute after page load?
- Why is my Javascript not working?
- How can I get the values of data attributes in JavaScript code?
- Javascript: getElementById vs getElementsById (both works on different pages)
- How to change css property using javascript
- javascript close current window
- Can I set subject/content of email using mailto:?
- I am trying to make a simple toggle button in javascript
- How to call a JavaScript function within an HTML body
- How to save user input into a variable in HTML and JavaScript
- Hiding a button in Javascript
- Show/hide ‘div’ using JavaScript
- How to make JavaScript execute after page load?
- Get HTML code using JavaScript with a URL
- Calculate percentage Javascript
- How to display image with JavaScript?
- Resize image with javascript canvas (smoothly)
- JavaScript function onhover in
- Check if an element contains a class in JavaScript?
- Hide element by class in pure Javascript
- How to play a mp3 using Javascript? [duplicate]
- Function not defined javascript
- How to submit a form with JavaScript by clicking a link?
- How to call a REST web service API from JavaScript?
- Check a radio button with javascript
- Mailto on submit button
- AppendChild() is not a function javascript
- How can I change an element’s class with JavaScript?
- JavaScript: Get image dimensions
- Why write script type=”text/javascript” when the mime type is set by the server?
- How to select an input element by value using javascript?
- javascript window.location in new tab
- How to create a hidden in JavaScript?
- How do I programmatically set the value of a select box element using JavaScript?
- How can I capture the right-click event in JavaScript?
- How do I clear the content of a div using JavaScript?
- How do I check whether a checkbox is checked in jQuery?
- (Google Map API) Geocode was not successful for the following reason: REQUEST_DENIED
- What character encoding is >?
- Setting table column width
- How can I set the default value for an HTML
- the use of `%3F` in URL
- Tab space instead of multiple non-breaking spaces (“nbsp”)?
- My website doesn’t work in I.E. (but does in chrome and firefox)
- Best way to encode Degree Celsius symbol into web page?
- How do you create a hidden div that doesn’t create a line break or horizontal space?
- How to “crop” a rectangular image into a square with CSS?
- Difference between id and name attributes in HTML
- How to draw diagonal lines with css
- Adding image inside table cell in HTML
- Full-screen iframe with a height of 100%
- How do I set vertical space between list items?
- Parse an HTML string with JS
- Shortest way to print current year in a website
- Is it possible to append to innerHTML without destroying descendants’ event listeners?
- How can I center a div within another div?
- How to align content of a div to the bottom
- Remove scrollbar from iframe
- wordpress contactform7 textarea cols and rows change in smaller screens
- Binding select element to object in Angular
- Dynamic height of div with css
- How can I copy to clipboard in HTML5 without using flash?
- How to make a div 100% height of the browser window
- Why doesn’t min-height not work on my page?
- How to scroll an HTML page to a given anchor
- How to run a function when the page is loaded?
- CSS table td width – fixed, not flexible
- Disabled href tag
- Creating Accordion Table with Bootstrap
- Creating Multiple Modals on a Single Page
- Why does my http://localhost CORS origin not work?
- Check if a div exists with jquery
- How to escape html code with html allowed
- Thumbnail + Excerpt = loss in word count
- Show post in slider
- Embed tag length issues
- How put links in wordpress dynamic sidebar?
- How to add a class to the element?
- WordPress editor not creating tags properly in tables
- Remove tags from wordpress head
- hyphenation not working in Gutenberg editor
- Display WordPress search results based on the selected Sub-Category
- Display GIF as Facebook link thumbnail
- How to use wp_ajax_set_post_thumbnail?
- Passing a value from an input field to a php function in WordPress?
- Show subcategory name selected in specific category woocoommerce
- Site images are fixed in front of my site content [closed]
- Post title appears twice in browser title bar