灵机一动想的点子,应该不难理解
<textarea onmousedown='selectAll(this);'>11111</textarea>
function selectAll(textarea) { if (event.button==2) { $(textarea).select(); } }