开发者社区> 问答> 正文

SN码跟设备映射之后,如何通过SN码绑定设备

SN码跟设备映射之后,如何通过SN码绑定设备

展开
收起
游客br76rw6jiq3r6 2020-09-23 16:33:42 581 0
1 条回答
写回答
取消 提交回答
  • !DOCTYPE html>

    姓名:

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 css body{ font-size: 13px; } .clstip{ border: #CCCCCC 1px solid; background-color: #EEEEEE; margin-top: 15px; padding: 5px; width: 185px; display: none; } .txt{ padding: 3px; border: #666666 1px solid; } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 JavaScript 在bind方法中,event.data作为参数传递到了事件中

    $(function(){ var message = "当前执行的是focus事件!"; $(".txt").bind("focus", {msg : message} , function(event){ $("#divtip").show().html(event.data.msg);//设置文本 });

    var message = "当前执行的是change事件!";
    $(".txt").bind("change", {msg : message} , function(event){
    	$("#divtip").show().html(event.data.msg);//设置文本
    })
    

    }) 1 2 3 4 5 6 7 8 9 10 11 普通的bind()方法

    $(function(){ $(".txt").bind({ focus:function(){ $("#divtip").show().html("当前执行的是focus事件!"); },change:function(){ $("#divtip").show().html("当前执行的是change事件!"); } }) })

    2021-02-22 00:09:15
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载