Question

N'importe quel navigateur vendeurs prennent en charge l'utilisation de langages de script en plus

  • text/javascript
  • text/vbscript (IE uniquement)

par exemple:

  • text/lua
  • text/cs-script
  • text/php
  • text/tcl

Si je voulais utiliser un autre langage de script dans un navigateur:

<SCRIPT type="text/javascript">
   ...some JavaScript...
</SCRIPT>

<SCRIPT type="text/vbscript">
   ...some vbscript...
</SCRIPT>

<SCRIPT type="text/perl">
   ...some Perl Script...
</SCRIPT>

<SCRIPT type="text/php">
   ...some Php...
</SCRIPT>

<SCRIPT type="text/tcl">
   ...some Tcl...
</SCRIPT>

<SCRIPT type="text/lua">
   ...some Lua...
</SCRIPT>

<SCRIPT type="text/pascalscript">
   ...some PascalScript...
</SCRIPT>

<SCRIPT type="text/cs">
   ...some C#...
</SCRIPT>

pourrais-je?

Est-il un moyen d'enregistrer 3ème partie les moteurs de script avec n'importe quel navigateur?

Était-ce utile?

La solution

Techniquement, Internet Explorer peut utiliser n'importe quelle langue de script qui fournit un IActiveScript , et j'ai vu des implémentations de Perl (à partir de ActiveState) et de TCL exécutant des clients dans IE.

Mais au point de Minitech, ce n'est pas quelque chose qui fonctionnerait à travers les navigateurs, et franchement c'est une idée terrible dans presque toutes les circonstances.

Autres conseils

non.Si vous souhaitez utiliser une langue différente, votre meilleur pari utilise quelque chose qui compile JavaScript (p. Ex. Pyjamas pour Python).

Google Chrome a un plugin de code natif, permettant l'utilisation de n'importe quelle langue pour laquelle vous avez le plugin correct.Par exemple, il y a un implémentation TCL pour cela.

Il est maintenant brython pour exécuter python 3 programmes:

voir www.brython.info

Travail impressionnant!

semblent travail avec de nombreux navigateurs (je n'ai pas IE)

...toujours en attente d'un perl de port...

There are what I consider hack-ish ways to do it which involves some kind of interpreter between the browser and the script language. Two examples of this are using SilverLight to interface with various dynamic languages, or JRuby to interface using Ruby script. Otherwise it has to get compiled to JS.

No, there isn't. Not any portable way, at least, and not anything you should do.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top