Jump to content
View in the app

A better way to browse. Learn more.

Next

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Besoin d'aide javascript

Featured Replies

Bonjour,

Je souhaiterai désactiver une série de boutons radios lors d'un clique sur un bouton, j'ai eu beau chercher je ne trouve pas, quelqu'un pourrait m'aider ?

Merci d'avance,

cordi@lement

William T-J

Pour cela il faut ruser un peu, avec du javascript.

Je t'ai écrit un exemple complet :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

<head>
<title>Test de onChange</title>
<script language="javascript">
	function desactiverRadios(radiosName)
	{	
		var mesRadios = document.getElementsByName(radiosName);
		for (i=0; i<mesRadios.length; i++)
		{
			mesRadios[i].disabled=true;
		}		
	}
</script>	
</head>

<body>

<form name="myform">
	<input type="radio" name="myradio" value="radio1" checked="checked"/>radio1<br/>
	<input type="radio" name="myradio" value="radio2" />radio2<br/>
	<input type="radio" name="myradio" value="radio3" />radio3<br/>
	<input type="button" value="Désactiver" onClick="javascript:desactiverRadios('myradio');"/>	
</form>	

</body>

</html>

  • Author

Woua super ça marche !!!!

Merci beaucoup,

j'ai une dernière petite question comment fait toujours en javascript, pour executer une fonction après un délais ?

Merci d'avance

cordi@lement

William T-J

Edited by Epractical

  • Author

Bonjour,

Quelqu'un pourrait m'aider s'il vous plait ?

J'ai trouvé la fonction : setTimeout();

mais j'ai eu des petits problèmes sur la syntaxe : setTimeout("fonction_test(),5000); ne marche

Merci d'avance :chinois:

Très cordi@lement

William T-J

Archived

This topic is now archived and is closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.