小编Ali*_*ali的帖子

为什么.animate在IE 8中如此之慢

这是我的动画代码

    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中修复它?

jquery

1
推荐指数
1
解决办法
467
查看次数

使用Reflection调用方法不起作用

我上课了

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)

c# asp.net reflection

-2
推荐指数
1
解决办法
154
查看次数

标签 统计

asp.net ×1

c# ×1

jquery ×1

reflection ×1