qq_46140811
Web students
2020-03-31 23:42

console.log 控制台不显示,求大佬指教

  • javascript

console.log 的内容,怎么在开发者工具的“console”没显示出来呢。本人新手,求大佬指教

chrome.browserAction.onClicked.addListener(function (tab) {
  console.log('Turning ' + tab.url + ' red!');
  window.alert("弹出来的文本信息1。");
  console.log("弹出来的文本信息2。");
  chrome.tabs.executeScript({
    code: 'document.body.style.backgroundColor="#f19f9f"'
  });
});

{
  "name": "Page Redder",
  "description": "Make the current page red",
  "version": "2.0",
  "permissions": [
    "activeTab"
  ],
  "background": {
    "scripts": ["background.js"],
    "persistent": false
  },
  "browser_action": {
    "default_icon": "TuBiao.png",
    "default_title": "Make this page red"
  },
  "manifest_version": 2
}

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐