var count = document.getElementById(“button_id”)。value
for (var i=1;i<=count;i++)
{
var client"#{i}" = new ZeroClipboard( document.getElementById("copy-button'#{i}'")
client"#{i}".on( "load", function(client"#{i}") {}
}
循环中的行是RoR, 它评估为
var client1 = new ZeroClipboard( document.getElementById("copy-button1")
client1.on( "load", function(client1) {}
依旧......
如何在JS