I have the follwing code in the content.js of Google Chrome extension:
jQuery(document).ready(function () {
jQuery("body").html('<input type="button" id="soso" value="asd" onclick="goFrame()" />');
});
function goFrame() {
alert('Value');
}
The button is created successfully, but when I click on it the message doesn't appear and I got the follwing error in the Google Chrome console:
Uncaught ReferenceError: goFrame is not defined