js获取光标位置 var TT = { /* * 获取光标位置 * @Method getCursorPosition * @param t element * @return number */ getCursorPosition:function(t){ if (document.selection) { t.focus(); var ds = document.selection; var range = ds.createRange(); var stored_range = ran…
<html><head><title>TEST</title><style>body,td { font-family: verdana, arial, helvetica, sans-serif; font-size: 12px;}</style><script type="text/javascript"> var start = 0; var end = 0; function add()…