You can check element exist or not with javascript by it id or name.
Check Element exist in Javascript
With Id :var check = document.getElementById("elementId"); if(check.length != 0) { alert('I am present'); }
With Name:
var check = document.getElementsByName("elementName"); if(check.length != 0) { alert('I am present'); }
Check Element exist in jQuery
With Id :if ($('#elementId').length > 0) { // it exists }