¡@

Home 

javascript Programming Glossary: current_line

Find out the 'line' (row) number of the cursor in a textarea

http://stackoverflow.com/questions/9185630/find-out-the-line-row-number-of-the-cursor-in-a-textarea

type text javascript var total_lines 1 total lines var current_line 1 current line var old_line_count main editor function function.. do stuff on key presses if keypress_code '13' Enter current_line 1 else if keypress_code '8' Backspace if old_line_count total_lines.. keypress_code '8' Backspace if old_line_count total_lines current_line 1 else if keypress_code '38' Up if total_lines 1 current_line..