用短语将一页链接到另一页

用短语将一页链接到另一页

本文介绍了用短语将一页链接到另一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在将一个页面链接到另一个这样的页面

Hi,

I am linking a page to another page like this

<a href="faqs.html?showData=5&letter=B" target="_blank">



因此,在常见问题页面上,它显示与5相关的data,并且在5数据中显示以B开头的字母,但是在B中,我需要精确地提出一个问题.



So on the faqs page it is showing data related to 5 and in that 5 data showing the letters that start with B but in the B I need to call exactly one question.

function checkIfAny()
{
  qs();
  showData(whichPage);
  window.location.hash = whichLetter;
}

function qs()
{
    var query = window.location.search.substring(1);
    var parms = query.split('&');
    for (var i=0; i<parms.length; i++)
    {
        var pos = parms[i].indexOf('=');
        if(i==0)
        {
            whichPage=parms[i].substring(pos+1);
        }
        else if(i==1)
        {
            whichLetter=parms[i].substring(pos+1);
        }
    }
    return "";
}
var whichPage;
var whichLetter;



有没有办法做到这一点,在此先感谢您的帮助.



Is there a way to do it like that and thanks in advance for your help.

推荐答案

<a href='#faq5'/>FAQ 5


然后将链接构造为


Then construct the link as

<a href=''FAQ.HTML#faq5''>Help item 5</a>



这篇关于用短语将一页链接到另一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 21:38