Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var query = window.location.search.replace("?page=" , "");
- var advName = [
- {
- "name" : "1111111"
- },
- {
- "name" : "2222222"
- },
- {
- "name" : "333333333"
- },
- {
- "name" : "444444444"
- },
- {
- "name" : "5555555555"
- }
- ];
- var advTitle = function(){
- situation = "page-" + query;
- val = $("#" + situation).index(".advBox li");//jQuery使用
- document.title = advName[val].name;
- }
- advTitle();
- window.onload = function(){
- $(advBg).addClass(situation);//jQuery使用
- val = $(this).index(".advBox li");//jQuery使用
- var charaClick = function(){
- i = "";
- for(var i = 0; i < Selector.length; i++){
- Selector[i].addEventListener('click', function(e) {
- val = $(this).index(".advBox li");//jQuery使用
- getAttr = this.getAttribute('id');
- advBg.setAttribute("class", getAttr);
- replace = getAttr.replace("page-" , "");
- },false);
- }
- }
- charaClick();
- };
Add Comment
Please, Sign In to add comment