2

I have to display yes/no button on some condition on my asp.net page , I used windows.confirm() to display that but windows.confirm displays Ok/Cancel Button , Is there any way I can display Yes/No Button in asp.net page instead of Ok/Cancel using Javascript ?

4

6 に答える 6

5

シンプルに保ちたい場合は、いくつかの jQuery または YUI プラグインを確認するだけで、数行のコードで起動して実行できます。

たとえば、これは jQuery を使用し、これは YUI を使用します。

于 2009-01-02T21:54:50.100 に答える
0

これを試して。

JSコード: `if(confirm('Are you sure ???')){{

}そうしないと{

} `

于 2009-03-01T18:10:48.923 に答える
0

http://bytes.com/groups/javascript/149838-yes-no-dialog-box-javascript

Read there :)

于 2009-01-02T21:20:20.747 に答える
0

You cannot change the button text on a JavaScript alert, and while you can't change them on a VBScript message box, it has different text. How I got around this was to develop a custom div that contains buttons with the correct text on them that is displayed using absolute positioning and a shadow effect to give the appearance of a message box.

于 2009-01-02T21:21:33.897 に答える
0

not cross browser without creating an custom modal dialong or using one that is already built. if you can use ms ajax then it has a modal you can use.

于 2009-01-02T21:21:42.400 に答える
0

You can't do it using prompt, you can show a hidden div with html controls and javascript wired up to buttons. When you want to ask the question show the previously hidden div.

于 2009-01-02T21:23:40.693 に答える