“某些”“浏览器”支持的其他语言是VBScript,但是……你不想去那里.
对其他语言的支持仍在进行中.
今天你能得到的是拥有一个框架或库来将一种语言翻译成JavaScript
以下是其中一些以及一些小样本:
> GWT – Java
// Add a button to remove this stock from the table.
Button removeStockButton = new Button("x");
removeStockButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
int removedIndex = stocks.indexOf(symbol);
stocks.remove(removedIndex);
stocksFlexTable.removeRow(removedIndex + 1);
}
});
stocksFlexTable.setWidget(row, 3, removeStockButton);
> Pyjamas – Python
def greet(sender):
Window.alert("Hello, AJAX!")
> CofeeScript – (Ruby like)
square: (x) -> x * x
cube: (x) -> square(x) * x
> Pyscript – (Python之类)
// Example One
function triangle(a,b):
function sqroot(x): return Math.pow(x,.5)
return sqroot( a*a + b*b )
从这一点来看,GWT是最强大的.