简体   繁体   中英

Input in a messageDialog box [HTML / Javascript]

my question is simply how to put an input in a MessageDialog (Textbox ...). Here is the code for a button:

var msg = new Windows.UI.Popups.MessageDialog("<div>lol</div>", "Updates available");
enter code here

msg.commands.append(new Windows.UI.Popups.UICommand("Don't install", function (command) {
WinJS.log && WinJS.log("The 'Don't install' command has been selected.", "sample", "status");}));

msg.defaultCommandIndex = 1;
msg.showAsync();

您可以仅更新MessageDialog使其包含这样的文本框吗?

    var msg = new Windows.UI.Popups.MessageDialog("<div>lol<br/><input type="text"/></div>", "Updates available");

这是不可能的,它在MessageDialog中而不是文本框中显示代码

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM