简体   繁体   English

如何清除bootstrap-confirmation.js弹出窗口中文本框的内容?

[英]How to clear the content of textbox in bootstrap-confirmation.js popup?

I have gridview. 我有gridview。 In that gridview i have an Icon. 在那个gridview我有一个图标。 if the icon is clicked then the bootstrap popover with textbox and two buttons will be opened. 如果单击该图标,则会打开带有文本框和两个按钮的引导程序弹出窗口。 If i filled on that textbox of the popover and then i clicked outside of the popover, then the popover will be closed. 如果我在弹出框的文本框中填写内容,然后在弹出框的外部单击,则弹出框将被关闭。 and then again if i clicked that icon, the popover will be opened. 然后再次单击该图标,将打开弹出窗口。 but the textbox is not empty. 但文本框不为空。 the old value is place on that textbox. 旧值放在该文本框中。

Can anyone say, how to empty bootstrap popover textbox, when the popover is opened? 有人可以说,打开弹出式窗口时如何清空引导程序弹出式文本框?

My code is: 我的代码是:

<img src="Images/icon.png" data-title="Name" data-btnoklabel="Update"
        data-btncancellabel="Cancel" data-textbox="true" data-popout="true"
        runat="server" data-placement="left" data-toggle="confirmation-singleton"
        data-original-title=""
/>

1)-Lets suppose you have a function ClosePopup() for closing the popup .` 1)-让我们假设您有一个函数ClosePopup()用于关闭弹出窗口。

2)-You have two textboxes in the popup with ids txt1 and txt2 2)-您在弹出窗口中有两个textboxes ,其ID为txt1txt2

When function ClosePopup() will be fired :- 当函数ClosePopup()将被触发时:

 function ClosePopup(){
     //clear all the values 
     $("#txt1,#txt2").val("");
  }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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