dougutuo9879 2013-02-22 07:55
浏览 60
已采纳

当表单操作到同一页面时,保留页面位置?

On my current project, the user clicks on "Save Changes" on what they are editing, and it is further down the page where the edit box, saved text, etc... pops up. Is there a way I can have the site retain its page location in order to auto-scroll them back down to where they clicked edit?

Ideally I'd have some type of solution where the page wouldn't have to reload but I don't know how to do that, lol.

My site is coded in PHP.

Thanks

  • 写回答

6条回答 默认 最新

  • douchen2595 2013-02-22 07:58
    关注

    You might want to have a look at some tutorials on how to save a form via AJAX. This will mean you aren't POSTing the page, and therefore it won't refresh and the user won't lose their position on the page.

    http://www.jstiles.com/Blog/How-To-Submit-a-Form-with-jQuery-and-AJAX
    http://www.devblog.co/easy-jquery-ajax-php-contact-form/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(5条)

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序