iziToast
iziToast copied to clipboard
I would like to ask you how to add select and button to the inputs attribute?
I have finished inputs and added the select tag to add multiple options, but the mouse click does not respond when I allow the browser, may I ask what is the matter and how to deal with this, I do not see the relevant code on your website.
Please help me.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./css/iziToast/iziToast.min.css">
</head>
<body>
<button onclick="test()">1231</button>
<script src="./js/iziToast/iziToast.min.js"></script>
<script>
iziToast.question({
timeout: 20000,
title: 'Hey',
message: 'Are you sure about that?',
position: 'center',
inputs: [
// I did, but it didn't work when I clicked
['<select><option value="123">1</option></select>','click',function(a,b,c,d) {
console.log(a);
console.log(b);
console.log(c);
console.log(d);
}]
]
});
</script>
</body>
</html>
@marcelodolza
based on your code, when the button is clicked is called the function "test()", where is this function in the script? the call to iziToast.question must be inside the function test()
根据您的代码,单击按钮时称为函数“test()”,该函数在脚本中的位置? 对 iziToast.question 的调用必须在函数 test() 内
think you