Javascript To Change Metadata / Metatags Dynamically

前端 未结 5 689
小蘑菇
小蘑菇 2020-12-19 15:21

I\'ll describe what I\'m trying to accomplish and if it seems that my method is dumb please feel free to let me know:

I have a page with a video gallery and a flash

5条回答
  •  离开以前
    2020-12-19 15:39

    You wanna do something like this in the code for jQuery

    $(document).ready(function(){
        $('title').text("Your new title tag here");
        $('meta[name=description]').attr('content', 'new Meta Description here');
    });
    

提交回复
热议问题