Leaks-Community
Veuillez vous connecter pour continuer.

Rejoignez le forum, c’est rapide et facile

Leaks-Community
Veuillez vous connecter pour continuer.
Leaks-Community
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
Qui est en ligne ?
Il y a en tout 1 utilisateur en ligne :: 0 Enregistré, 0 Invisible et 1 Invité

Aucun

Voir toute la liste

Les posteurs les plus actifs de la semaine
15 Messages - 83%
1 Message - 6%
1 Message - 6%
1 Message - 6%
Statistiques
Nous avons 2974 membres enregistrésL'utilisateur enregistré le plus récent est TygrouNos membres ont posté un total de 3166 messagesdans 933 sujets
-39%
Le deal à ne pas rater :
Pack Home Cinéma Magnat Monitor : Ampli DENON AVR-X2800H, Enceinte ...
1190 € 1950 €
Voir le deal

Aller en bas
avatar
hacxx
Messages : 740
Points : 1843
Date d'inscription : 21/01/2024

Skill and Learn - Ask users for input programmatically Empty Skill and Learn - Ask users for input programmatically

Jeu 2 Mai - 1:09
Input Tag
Input tag is the most easy way to ask for user input as it can be configured in multiple ways in style and use.
The webmaster can edit the text and how it's shown to the user.

Code:

<input name="text" id="example1" placeholder="http://www.example.com" style="width:100%" spellcheck="false" autocomplete="off">

Code:

What does it mean?

<input name="text">
Defines the input type

id="example1"
Save the user input as example1.

placeholder="http://www.example.com"
Show http://www.example.com on input until user enter keywords.

style="width:100%"
Expand the input to 100%. To fit in a box, etc.

spellcheck="false"
Disable spellcheck.

autocomplete="off">
Disable autocomplete.

Prompt
Super is easy to use and it shows a console to the user asking for input.
The webmaster can edit the text and how it's shown to the user.

Code:

var keyword = prompt("Type something to search!\n\nHacxx code.", "");

Code:

What does it mean?

var keyword
Save any input from the user as keyword var.

prompt("Type something to search!\n\nHacxx code.", "");
Initiate prompt, show the text and if the webmaster want to add text to the input use the last , "");

Note: \n - New line. (Good for styling)
Revenir en haut
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum