Open and close new window using JQuery

September 30, 2015 0 Comments

In this article i will show you how to open new window when we click on button using JQuery. I will give an example of it. Also do some thing like when we click on other button then opened new window will closed also mentioned in the example.

I have explained Get browser details using JQuery, Button work as fileupload control in JQuery.
Source code
<!DOCTYPE html>
    <title> OPen and close window using JQuery </title>

    <form name="form1">
        <input type="button" value="Open New Window" id="btnOpen" />
        <p> <input type="button" value="Close New Window" id="btnClose" />

    <script src=""></script>
    <script type="text/javascript">
        var Window1;
        $(function () {
            $(form1.btnOpen).click(function () {
                Window1 ='', 'YourWindow', 'height=500,width=500');
            $(form1.btnClose).click(function () {

Code Generate the following output
Open and close new window using JQuery

Jacob Lefore

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard. Google