小编Raj*_*nEy的帖子

锚标记不起作用 Chrome 扩展程序

我是 chrome 扩展领域的初学者。目前我正在制作一个扩展,我想通过单击在扩展选项卡中打开一个新页面。所以这是我的 popup.html 代码

<html>
<head>
<title>Open Google</title>
</head>
<body>
<a href="https://google.com">Google</a>     
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

当我将其作为 html 页面打开时,google 链接正在工作,但这在我的扩展程序中不起作用。这是我的 manifest.json 文件

{
"manifest_version": 2,
"name": "Open Google",
"version": "1.0",

"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"permissions": [
"activeTab"
]
}
Run Code Online (Sandbox Code Playgroud)

html javascript anchor google-chrome-extension

3
推荐指数
1
解决办法
1177
查看次数

这个程序有什么问题?

#include <stdio.h>
#include<string.h>
int main() {
    char * a;
    int b[26] = {
        0
    };
    long r = 0;
    scanf("%s", a);
    int j = strlen(a);
    for (int i = 0; i < j; i++) {
        b[a[i] - 'a'] += 1;
    }
    for (int i = 0; i < 26; i++) {
        if ((b[i] / 2) * 2 == b[i])
            r += b[i] / 2;
        else
            r += (b[i] + 1) / 2;
    }
    printf("%ld", r);
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

输入 - …

c runtime

-3
推荐指数
1
解决办法
97
查看次数

标签 统计

anchor ×1

c ×1

google-chrome-extension ×1

html ×1

javascript ×1

runtime ×1