Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I would like to ask you how to add select and button to the inputs attribute? #215

Open
ZhaoHf666 opened this issue Sep 27, 2023 · 3 comments

Comments

@ZhaoHf666
Copy link

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>
@ZhaoHf666
Copy link
Author

@marcelodolza

@crivadavi
Copy link

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()

@ZhaoHf666
Copy link
Author

根据您的代码,单击按钮时称为函数“test()”,该函数在脚本中的位置? 对 iziToast.question 的调用必须在函数 test() 内

think you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants