html 超链接问题

来源:百度知道 编辑:UC知道 时间:2024/09/24 23:51:55
我想在连接到一个页面的同时传送一个值,要怎么写
比如我想链接到 href="/host/inex.shtml" 并且传送 “cn”这个字符过去!要吧cn写在 href="/host/inex.shtml"里,要怎么写!???
2楼说的基本上就是这个意思了! 但是在 inex.shtml中怎么获得这个值难!?

怎么传递?涉及到表单吗?用 get 方式还是 post 方式?

试试看:href="/host/inex.shtml?cn=值"

我还是不太明白你的意思,所谓的传递一个值什么意思?

补充:在 index.shtml 里用 后台语言获得 cn 的值。比如 ASP 的话,用:
request.QueryString("cn") 获得值

<a href="/host/inex.shtml">cn</a>

这个要用在代码中写了,html实现不了。