小编S4U*_*00N的帖子

引导程序弹出窗口中的 onclick 事件

收件箱按钮被点击它运行inbox_open()函数和在收件箱中头3个按钮出现,但onclick事件侦听器是丢失。// inbox.open评论后检查代码,关键行:b.onclick = function() { console.log("button was clicked"); }inbox.setAttribute("title", poH.innerHTML);

// inbox
var inbox = document.getElementById("inbox");
var inbox_news = document.getElementById("inbox_news");

var poH = document.createElement("span");
var poC = document.createElement("span");

var new_from_to = [0, 2, 3];
var number_of_news = [2, 1, 2];
var news_price_data = [10, 20, 30, 40, 50];

// inbox.open
function inbox_open() {
  for (var i = 0; i < number_of_news.length; i++) {
    var b = document.createElement("button");
    b.innerHTML = (i + …
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery bootstrap-4

5
推荐指数
1
解决办法
4056
查看次数

标签 统计

bootstrap-4 ×1

css ×1

html ×1

javascript ×1

jquery ×1