标签: live

jQuery跨度输入,反之亦然

我有个问题.看下面的代码:

   $(function () {
    $('span').live('click', function () {
        var input = $('<input />', {
            'type': 'text',
                'name': 'aname',
                'value': $(this).html()
        });
        $(this).parent().append(input);
        $(this).remove();
        input.focus();
    });

    $('input').live('blur', function () {
        $(this).parent().append($('<span />').html($(this).val()));
        $(this).remove();
    });
    });
Run Code Online (Sandbox Code Playgroud)

和HTML现在:

<span>Click aici</span>
Run Code Online (Sandbox Code Playgroud)

所以,这显然适用于jquery 1.8.3,包括在内.在1.8.3 .live()被弃用之后,我们需要使用.on().所以代码变成:

$(function () {
    $('span').on('click', function () {
        var input = $('<input />', {
            'type': 'text',
                'name': 'aname',
                'value': $(this).html()
        });
        $(this).parent().append(input);
        $(this).remove();
        input.focus();
    });

    $('input').on('blur', function () {
        $(this).parent().append($('<span />').html($(this).val()));
        $(this).remove();
    });
    });
Run Code Online (Sandbox Code Playgroud)

要不就:

$(function () {
    $('span').click(function () { …
Run Code Online (Sandbox Code Playgroud)

html jquery input live

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

在IIS上部署后,Process.Start()不会重定向

我正在使用一个项目,使用Process.start()重定向到实时Web OAuth请求令牌后,在本地IIS服务器上部署该站点它停止工作,它不会在这里进行任何重定向我的代码

authorizeUri.AppendFormat("?client_id={0}&", appId);
    authorizeUri.AppendFormat("scope={0}&", "wl.signin");
    authorizeUri.AppendFormat("response_type={0}&", "token");
    authorizeUri.AppendFormat("redirect_uri={0}", HttpUtility.UrlEncode("http://scarnetdomain.com/Default3.aspx/"));
    ProcessStartInfo startInfo = new ProcessStartInfo();
    startInfo.FileName = authorizeUri.ToString();
    Process.Start(startInfo);
Run Code Online (Sandbox Code Playgroud)

asp.net iis redirect live process.start

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

一般来说,dev的区别是什么.vs staging网站的一部分?

什么是代码明智的开发和网站的faging之间的区别?

我的意思是开发< - >直播,比直播所有代码都干净/最小化,对吧?

任何信息,现实生活中的"代码"部分示例?

php live staging

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

.live()vs .on()方法

我正在开发一个项目,当我按下min/plus按钮而不用方法悬停图片时.live(),该功能正常工作.在.on()方法的情况下,该功能不起作用.

我该如何解决这个问题,所以它也适用于.on()方法?

这是我所指的一个例子(我修复了这个例子中的错误,但我使用的.on方法是错误的).

jquery click live

-5
推荐指数
1
解决办法
7421
查看次数

标签 统计

live ×4

jquery ×2

asp.net ×1

click ×1

html ×1

iis ×1

input ×1

php ×1

process.start ×1

redirect ×1

staging ×1