English 中文(简体)
有效使用哈希班、贾瓦文、PHP和具有动态内容的AJAX
原标题:Effective Use of Hashbang, JavaScript, PHP and AJAX With Dynamic Content

我先把网页放在桌面应用一波开始开发的网页上,我真的要利用超5技术和动态内容与 Java本。 基本上,如果在浏览器中访问“root”网页(索引.php,或仅访问名录),就可看到有关FQ和接触表的章节(但接触表除外;在标题上点击可能会引发 j声。 在网页左边,我有一条连接家庭、家庭、家庭、企业和联系的基本导航。 这些联系的根基是“#!/home”、“#!/about”、“#!/faq”和“#!/contact”(分别)。 当其中一人被点击时,Javagust/jQuery将隐藏除头部、脚部和腹部外的所有内容(就接触表而言,还将删除该科科长的点击手,因为它没有必要,而且当它是该网页的唯一内容时,它无法隐藏。 目前,我正在利用这一点:

window.onload = (function() {
    switch(location.hash) {
    case "#!/contact":
        $("body > *:not(section#contact, nav, header, footer)").hide();
        $("#contact > #labels, #contact > form").slideDown( slow );
    // and similar for the other hashbang URIs
    }

    if (location.hash == "#!/" || location.hash == "#!/home" || !eval(location.hash)) {
        $("a[href= #!/contact ]").click(function() {
            $("#contact > #labels, #contact > form").slideDown( slow );
        });
    }
    // similar for the other hashbangs
});

我几乎可以肯定,这样做有更好的办法,我也愿确保这一页及其动态内容能够被谷歌的机器人适当控制。 我是否应该利用购买力平价来适当做到这一点? 如何?

感谢!

最佳回答
问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签