Vertical Selection Using Jquery

I have a weird requirement and I don't know how I able to achieve it.

I have a textarea which contains the text like

text1 text2 text3 text4 text5 text6 text7 text8
text1 text2 text3 text4 text5 text6 text7 text8
text1 text2 text3 text4 text5 text6 text7 text8
text1 text2 text3 text4 text5 text6 text7 text8
text1 text2 text3 text4 text5 text6 text7 text8
text1 text2 text3 text4 text5 text6 text7 text8
and so on..

Now I want to make a selection using mouse only on text3 column. Can it be possible? In Ms word we used to do it by pressing Alt key. But is it possible to make vertical selection in web component?


Well you could achieve something like when the user clicks check the select column have:

$('tr').find('td:eq(2)')

Select all td's in the third column (not sure if it's 0 or 1 based but i guess 0); Then you can also let's say add some css class to make it appear that those columns are selected and also grab the data.

EDIT:

For a textarea not sure how you could do that.

链接地址: http://www.djcxy.com/p/70072.html

上一篇: NTLM身份验证和智能卡

下一篇: 使用jquery进行垂直选择