how to get outerHTML with jquery in order to have it cross-browser
问题 I found a response in a jquery forum and they made a function to do this but the result is not the same. Here is an example that I created for an image button: var buttonField = $('<input type="image" />'); buttonField.attr('id', 'butonFshi' + lastsel); buttonField.val('Fshi'); buttonField.attr('src', 'images/square-icon.png'); if (disabled) buttonField.attr("disabled", "disabled"); buttonField.val('Fshi'); if (onblur !== undefined) buttonField.focusout(function () { onblur(); }); buttonField