1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| <script>
// HTML to JavaScript converter
// By John Krutsch (http://asp.xcentrixlc.com/john)
// Moderator of the JavaScript Kit Help Forum: http://freewarejava.com/cgi-bin/Ultimate.cgi
function scriptIt(val){
val.value=val.value.replace(/"/gi,""")
val.value=val.value.replace(/'/gi,"'")
valArr=escape(val.value).split("%0D%0A")
val.value=""
for (i=0; i<valArr.length; i++){
val.value+= (i==0) ? "<script>\ninfo=" : ""
val.value+= "\"" + unescape(valArr[i])
val.value+= (i!=valArr.length-1) ? "\" + \n" : "\"\n"
}
val.value+="\ndocument.write(info)\n<\/script>"
}
function ctrlA(el) {
with(el){
focus(); select()
}
if(document.all){
txt=el.createTextRange()
txt.execCommand("Copy")
window.status='Sélectionner et copier dans le presse-papier'
}
else window.status='Appuyer sur Ctrl-c pour copier le texte dans le presse-papier'
setTimeout("window.status=''",3000)
}
</script> |
Partager