var regexpComment = /\/\*([\s\S]*?)\*\//;
var multiline = function(func){
return regexpComment.exec(func.toString())[1];
}
var s = multiline(function(){
/*<div>
<table>
<tr>
<td>
123456
</td>
</tr>
</table>
</div>*/
});
console.log(s);
同事大哥告诉我的,长见识了。。。