For example:
<input id="#me" type="button" callme="doAction()"/>
<script>
var result = callFunction( $("#me").attr('callme') ); /// ?????????
</script>
For example:
<input id="#me" type="button" callme="doAction()"/>
<script>
var result = callFunction( $("#me").attr('callme') ); /// ?????????
</script>
A better solution would be to not include the function in your HTML markup. It is almost always better to separate your markup from your scripting.
Instead consider adding it to your dom object using
$('#me').data('callme', function(){...});
or
$('#me').data('callme', doAction);
and calling it using
$('#me').data('callme')()
or a little safer
($('#me').data('callme')||jQuery.noop)()
See the jQuery documentation for more details on the data function.
jQuery.noop() is in jQuery version 1.4+jQuery.noop can be replaced with function(){} if you need to or you could assign it yourself somewhere with jQuery.noop = function(){};If the attribute callme is the name (identifier) of a function just use
<input id="#me" type="button" callme="doAction"/>
(window[$("#me").attr('callme')] || function() {})();
so you can avoid using an expensive eval().