我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

存储包含#bookmark的完整网址[重复]

This question already has an answer here:

  • Can I read the hash portion of the URL on my server-side application (PHP, Ruby, Python, etc.)? 13 answers
  • How can I store a full url that contains a hashmark within a variable? 1 answer

i have a URL like:

http://localhost/myproject/contact-us#feedback

i want to store full URL in a variable including #feedback.

How to do this???

</div>

Got the answer:

fetching the URL using JS like:

var url = location.href;

Thank you every one for suggestions :)

You could read the URL including #feedback with JavaScript and store it in your database via Ajax.

近期文章

  • 如何在表单内调用php文件(html)
  • 是否有HTML的特定名称? [关闭]
  • 如何为localhost配置htaccess?
  • 如何将此表单拆分为两个值
  • 获取表单数据并将其写入XML文件
  • 从php页面重定向到html页面
  • 将常规PHP格式化为智能代码
  • 结构数据库插入和逻辑
  • 使用存储过程和PHP进行搜索
  • 难以远程连接MySQL
  • 通过PHP写入数据库 - MySQL - Android
  • 如何在PHP中的标签a上添加onclick事件?
  • 如何在Qt / C ++中访问HTTP GET / POST API [关闭]
  • 设计问题:哪种做法更好?
  • 在每个ajax调用中重新创建php会话
  • easyphp 13.1中的mysql意外结束
  • 单选按钮选中下一页的值
  • PHP多个图像调整大小不起作用
  • 如何从XML文件中获取参数?
  • Codeigniter网址/控制器/功能/ 1/3

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华