[JavaScript] NS_ERROR_XPC_NOT_ENOUGH_ARGS
Snip714
Messages postés
240
Date d'inscription
Statut
Membre
Dernière intervention
-
chlabelek -
chlabelek -
Bonjour, lorsque j'exécute ce code javascript, ça me met "NS_ERROR_XPC_NOT_ENOUGH_ARGS".
Voici la fonction :
Et le html :
Merci beaucoup d'avance pour vos réponses,
Cordialement,
Voici la fonction :
function add(cod) { var bal = document.getElementById(cod).value; var v2 = '</'+cod+'>'; if (cod == "code") { var val = '<code language="'+bal+'" title="">'; } else if (cod == "colo") { var val = '<color="'+bal+'">'; } var text = document.getElementById("textarea"); if (text.curseur) { text.curseur.text = val + text.curseur.text + v2; } else if (text.selectionStart >= 0 && text.selectionEnd >= 0) { var debu = text.value.substring(0, text.selectionStart); var enter = text.value.substring(text.selectionStart, text.selectionEnd); var fin = text.value.substring(text.selectionEnd); text.value = debu + val + enter + v2 + fin; text.focus(); text.setSelectionRange(debu.length + val.length, text.value.length - fin.length - v2.length); } else { text.value += val + v2; text.focus(); } document.getElementById(cod).options[0].selected = true; }
Et le html :
<select class="kit" style="width: 120px;" id="code" onchange="add('code');">
Merci beaucoup d'avance pour vos réponses,
Cordialement,
A voir également:
- [JavaScript] NS_ERROR_XPC_NOT_ENOUGH_ARGS
- Telecharger javascript - Télécharger - Langages
- A javascript error occurred in the main process - Forum Handicap / Accessibilté
- Erreur #125 javascript - Forum Mozilla Firefox
- Afficher un tableau javascript en html ✓ - Forum Javascript
- Javascript arrondi - Forum Javascript