web前端|js教程
js获取光标位置
web前端-js教程
html5电影院选座源码,ubuntu字符串,java爬虫图片视频,webexam php,seo网络公关lzw
function getTxt1CursorPosition(){
var oTxt1 = document.getElementById("txt1");
var cursurPosition=-1;
if(oTxt1.selectionStart){//非IE浏览器
cursurPosition= oTxt1.selectionStart;
}else{//IE
var range = document.selection.createRange();
range.moveStart("character",-oTxt1.value.length);
cursurPosition=range.text.length;
}
alert(cursurPosition);
}
function setTxt1CursorPosition(i){
var oTxt1 = document.getElementById("txt2");
var cursurPosition=-1;
if(oTxt1.selectionStart){//非IE浏览器
oTxt1.selectionStart=i;
}else{//IE
var range = oTxt1.createTextRange();
range.move("character",i);
range.select();
}
}
function getTa1CursorPosition(){
var evt =window.event?window.event:getTa1CursorPosition.caller.arguments[0];
var oTa1 = document.getElementById("ta1");
var cursurPosition=-1;
if(oTa1.selectionStart){//非IE浏览器
cursurPosition= oTa1.selectionStart;
}else{//IE
var range = oTa1.createTextRange();
range.moveToPoint(evt.x,evt.y);
range.moveStart("character",-oTa1.value.length);
cursurPosition=range.text.length;
}
alert(cursurPosition);
}
function setTa1CursorPosition(i){
var oTa2 = document.getElementById("ta2");
if(oTa2.selectionStart){//非IE浏览器
oTa2.selectionStart=i;
oTa2.selectionEnd=i;
}else{//IE
var range = oTa2.createTextRange();
range.move("character",i);
range.select();
}
}
米拓 商城模块源码,vscode怎么多选行,ubuntu 配置服务,mac 运行tomcat,天才小网管sqlite,红色调网页设计,jsp把文件放存进数据库,微信与服务器网络连接稳定,bootstrap table插件详解,php前端开发有哪些框架,群晖 爬虫,PHP Yaf,南充seo,springboot树洞,wordpress tag标签页,b2b网站模版,在网页中图片无限切换效果,织梦模板的安装方法不同模板通用1,iwebshop 后台地址,ecshop登陆页面修改,idc销售管理系统,atm柜员机模拟程序 javalzw