复制代码代码如下:
<script type = "text/javascript">
ฟังก์ชั่น gettxt1cursorposition () {
var otxt1 = document.getElementById ("txt1");
var cursurposition = -1;
if (otxt1.selectionStart) {// 非 ie 浏览器
Cursurposition = OTXT1.SelectionStart;
} else {// เช่น
ช่วง var = document.selection.createrange ();
range.movestart ("อักขระ",-otxt1.value.length);
cursurposition = range.text.length;
-
การแจ้งเตือน (คำสาป);
-
ฟังก์ชั่น settxt1cursorposition (i) {
var otxt1 = document.getElementById ("txt2");
var cursurposition = -1;
if (otxt1.selectionStart) {// 非 ie 浏览器
OTXT1.SELECTIONSTART = I;
} else {// เช่น
ช่วง var = otxt1.createTextrange ();
range.move ("ตัวละคร", i);
Range.Select ();
-
-
ฟังก์ชั่น 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 {// เช่น
ช่วง var = ota1.createTextrange ();
Range.MoveTopoint (EVT.X, EVT.Y);
range.movestart ("ตัวละคร",-ota1.value.length);
cursurposition = range.text.length;
-
การแจ้งเตือน (คำสาป);
-
ฟังก์ชั่น setta1cursorposition (i) {
var ota2 = document.getElementById ("ta2");
if (ota2.selectionStart) {// 非เช่น浏览器
OTA2.SelectionStart = i;
OTA2.SelectionEnd = i;
} else {// เช่น
ช่วง var = ota2.createTextrange ();
range.move ("ตัวละคร", i);
Range.Select ();
-
-
</script>