please help java script about close current window. this is my code and it does not work.
<input type="button" class="btn btn-success" style="font-weight: bold; display: inline;" value="Close" onclick="closeMe()"> function closeMe() { window.opener = self; window.close(); }
I tried this but it doesn’t work either:
var win = window.open("", "_self"); win.close();
Related Posts:
- 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)
- mailto using javascript
- mailto using javascript
- Mailto using Javascript?
- How to change css property using javascript
- 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]
- mailto using javascript
- 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
- 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?
- HTML encoding issues – “” character showing up instead of ” “
- Center image using text-align center?
- CSS Background Opacity [duplicate]
- How to get a tab character?
- How to make an image center (vertically & horizontally) inside a bigger div
- How to center text with Markdown?
- WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for ‘jquery’. Please add a ScriptResourceMapping named jquery(case-sensitive)
- Disable Scrolling on Body
- CSS Background Image Not Displaying
- Changing image sizes proportionally using CSS
- How to give the background-image path in CSS?
- How to overlay image with color in CSS?
- CSS Background image not loading
- Outline radius?
- CSS Background Image Not Displaying
- Why is this HTML5 document invalid?
- How do I modify the URL without reloading the page?
- How do you give iframe 100% height
- HTML Display Current date
- Document Root PHP
- How to display a gif fullscreen for a webpage background?
- Padding a table row
- document.getElementById().value doesn’t set the value
- How to run a function when the page is loaded?
- jquery – how to show a hidden div
- anchor jumping by using javascript
- How to create spoiler text?
- jQuery scrollTop() method not working
- FormData append not working
- How do I horizontally center a table in Bootstrap
- How do I center text in a span?
- text-align justify not working
- HTML / CSS table with GRIDLINES
- How to embed a Google Drive folder in a website
- Pure HTML Back Button
- How to access and download a file from a server using HTML 5
- Display text on MouseOver for image in html
- Layout a flex box similar to a table?
- html : iframe not showing content in html
- Javascript code inside “” in core WordPress files .php
- Remove html markup by wordpress
- How can I set different html lang attribute for different countries?
- How to integrate my HTML and javascript into my child theme
- parts of url disappear when using # inside href=”” [closed]
- Noscript not working as it should in wordpress site
- remove string: ‘custom content…’ from every page
- How to disable escaping html chars in wordpress?
- Whitespace Before Doctype
- html entities occur in the_excerpt used as meta description
- Use Mail-Tag from Contac Form 7 in a script
- how to let users upload their custom cover image
- separate list of programs in html/javascript coming from php
- Possible jquery / library conflict in plugin usage
- How can I insert a disclaimer in a WordPress site?