 <p>try this its working I've tested this code</p> <pre><code>$(document).ready(function() { alert($("input[value='Cancel']").attr("id")); }); </code></pre> <p>HTML code</p> <pre><code>&lt;input type="button" value="Cancel" class="supportButton" id="whitelist.onCancelUploadButton" /&gt; </code></pre>