Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

42 lignes
1.1 KiB

  1. function alpha(item) {
  2. var input = document.conversion.saisie;
  3. if (document.selection) {
  4. input.focus();
  5. range = document.selection.createRange() ;
  6. range.text = item ;
  7. range.select();
  8. }
  9. else if (input.selectionStart || input.selectionStart == '0') {
  10. var startPos = input.selectionStart;
  11. var endPos = input.selectionEnd;
  12. var cursorPos = startPos;
  13. var scrollTop = input.scrollTop;
  14. var baselength = 0;
  15. input.value = input.value.substring(0, startPos)
  16. + item
  17. + input.value.substring(endPos, input.value.length);
  18. cursorPos += item.length;
  19. input.focus();
  20. input.selectionStart = cursorPos;
  21. input.selectionEnd = cursorPos;
  22. input.scrollTop = scrollTop;
  23. }
  24. else {
  25. input.value += item;
  26. input.focus();
  27. }
  28. }
  29. function copy() {
  30. textRange=document.conversion.saisie.createTextRange();
  31. textRange.execCommand("Copy");
  32. textRange="";
  33. }
  34. var car;
  35. function annuler () {
  36. car = document.conversion.saisie.value;
  37. car=car.replace(/\u200b/g, "");
  38. document.conversion.saisie.value=car;
  39. }