Avatar billede cocolumbo Nybegynder
15. september 2000 - 09:47 Der er 3 kommentarer og
1 løsning

Alert

Hvordan får man et spørgsmålstegn i alert i stedet for udråbstegnet?
Avatar billede limemedia Nybegynder
15. september 2000 - 09:52 #1
<SCRIPT>
  alert(\"Intruder Alert!!!\");
  confirm(\"Kill the Intruder ?\");
</SCRIPT>
Avatar billede cocolumbo Nybegynder
15. september 2000 - 09:58 #2
Hvad skal så gøre for at den går tilbage til siden uanset hvilken af kanpperne man trykker på?
Avatar billede kasseper Nybegynder
15. september 2000 - 10:08 #3
Det gør den også :

<html>
<head></head>
<body>
dette er en test
<SCRIPT>
  alert(\"Intruder Alert!!!\");
  confirm(\"Kill the Intruder ?\");
</SCRIPT>
</body>
</html>

ER samme side som hvis scriptet ikke var med....

Se evt :

confirm
Displays a Confirm dialog box with the specified message and OK and Cancel buttons.Method of
window

Implemented in
JavaScript 1.0



Syntax
confirm(message)
Parameters
message
A string.



Description
Use the confirm method to ask the user to make a decision that requires either an OK or a Cancel. The message argument specifies a message that prompts the user for the decision. The confirm method returns true if the user chooses OK and false if the user chooses Cancel.

You cannot specify a title for a confirm dialog box, but you can use the open method to create your own confirm dialog. See open.

Examples
This example uses the confirm method in the confirmCleanUp function to confirm that the user of an application really wants to quit. If the user chooses OK, the custom cleanUp function closes the application.

function confirmCleanUp() {  if (confirm(\"Are you sure you want to quit this application?\")) {      cleanUp()  }}
You can call the confirmCleanUp function in the onClick event handler of a form\'s push button, as shown in the following example:

<INPUT TYPE=\"button\" VALUE=\"Quit\" onClick=\"confirmCleanUp()\">


----------------------------
ljweb har svaret....
Avatar billede cocolumbo Nybegynder
15. september 2000 - 10:10 #4
Oki
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester