这是我的动画代码
function MoveTeleport(LeftRight,UpDown) {
var TileMoveLeft = new Number(-LeftRight);
var TileMoveUp = new Number(-UpDown);
this.MovetoLeft = TileMoveLeft * 70 + 'px';
this.MovetoUp = TileMoveUp * 70 + 'px';
this.Move = function () {
$('#Player').fadeTo(200,0.1);
$('#Map_Player').animate({
'left': '+=' + this.MovetoLeft,
'top': '+=' + this.MovetoUp
}, 1000, function () {
LeftCurrent = $('#Map_Player').css('left', 10);
UpCurrent = $('#Map_Player').css('top', 10);
$('#Player').fadeTo(200, 1);
});
}
}
Run Code Online (Sandbox Code Playgroud)
它在FireFox,Opera,Chrome中动画如此美观.但在IE8中,它确实不能正常工作,任何想法为什么?或者如何在IE 8中修复它?
我上课了
private class MyRouter
{
public string Json {get;set;}
public string Class { get; set; }
public string Method { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
它必须通过Json Arg调用Class中的Method,我怎样才能通过Reflection实现它?我做了这个,但没有任何帮助
MyRouter MR = new MyRouter(){initilising the class};
Assembly assembly = Assembly.Load("Common");
Type t = assembly.GetType("Common." + MR.Class);
var x = t.GetMethod(MR.Method ).Invoke(MR.Json,null);
Run Code Online (Sandbox Code Playgroud)