How can I retrieve just the javascript, and not the wrapped function, in IE 6/7
You generally don't want to rely on string values for inline event handlers at all (in fact you should generally avoid using inline event handler attributes altogether in favour of binding to functions from script — especially if you're using jQuery, where this approach is the norm). But if you have to, the workaround is the DOM method getAttributeNode.
var link= $('a')[0]; // or whatever
alert(link.getAttributeNode('onclick').value);