本文介绍了刷新页面后的光标位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.

刷新页面后,光标位置出现问题.

这是JS

Hi guys..

I have problem with my cursor position after refresh my page.

Here is JS

function checkAvaib()
{
    var x=document.getElementById("form");
    x.action="student_new.php";
    x.target="_self";
    x.submit();
}



这是HTML



Here is HTML

<input type="text" name="user_id" id="user_id" maxlength="10" value="<?php echo $_REQUEST["user_id"];?>"  önblur="checkAvaib()" tabindex="15"/>

<input type="text" name="name" id="name"  value="<?php echo $_REQUEST["name"];?>" tabindex="16"/>



当我开始时,在 user_id 字段中输入,然后跳至下一个字段(名称).它将刷新页面和光标位置,并转到第一个标签/字段.
刷新后是否可以将光标指向下一个选项卡/字段?

预先感谢.



When I start enter at user_id field and then tab to the next field(name). It will refresh the page and cursor position going to the first tab/field.
Is it possible to point the cursor to the next tab/field after refresh?

Thanks in advance.

推荐答案




当我开始时,在 user_id 字段中输入,然后跳至下一个字段(名称).它将刷新页面和光标位置,并转到第一个标签/字段.
刷新后是否可以将光标指向下一个选项卡/字段?

预先感谢.



When I start enter at user_id field and then tab to the next field(name). It will refresh the page and cursor position going to the first tab/field.
Is it possible to point the cursor to the next tab/field after refresh?

Thanks in advance.



这篇关于刷新页面后的光标位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 21:42
查看更多