Check it url / file exists - with Jquery

HTML

URL: <input type="text" name="name">
<button type="submit" value="Submit">Check</button>
Answer: <input type="text" name="answer">

JavaScript

$.ajax({
        url:'http://www.example.com/3.zip',
        error: function()
        {
           alert('file does not exists');
        },
        success: function()
        {
            alert('file exists');
        }
    });

// Now to check if file exists call function
checkIfRemoteFileExists('http://www.yoursite.com/abc.html');

checkIfRemoteFileExists('http://www.google.de');