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

使用PHP变量在URL中锚定标签?

I have an anchor tag in my page as such:

<div name="anchor">

I want to include a link to this anchor in a url that is also populated with PHP vars, eg:

mysite.com/index.php?id=60&teamid=105#anchor

But this does not work. I have also tried:

mysite.com/index.php#anchor?id=60&teamid=105

But no luck there either.

Does anyone know the correct way of doing this?

Try

<div id="anchor">

and

mysite.com/index.php?id=60&teamid=105#anchor

The number sign points to ids - not names.

近期文章

  • 如何在下个月获得当前日期[重复]
  • 为什么我的php输出都在一行? [关闭]
  • Wordpress中的Woocommerce版本问题
  • 如何从JavaScript中删除字符串中的反斜杠
  • 如何计算数组内的值?
  • 高级搜索3个字段,需要查询
  • 使用AJAX / JSON返回整个文件
  • 我的sql或php有什么问题吗? (无法登录)
  • PHP致命错误:require_once():需要打开失败
  • 从文件中获取一行并拆分成一个数组
  • 如何转换运行php的批处理文件行在VBS脚本中执行相同操作
  • PHP警告:mysqli_num_rows()和数据库创建
  • 如何从一个下拉菜单的两个表中获取数据
  • 简单的Dom Html发送会话
  • 在PHP函数中避免SQL注入
  • CSV文件到多维数组
  • cron mysqldump说不使用密码
  • 如何将mysql数组转换为php数组
  • Phaser js php排行榜
  • 检查数据库中是否已存在用户名

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华