sendMSG:function(code,cmd,value){   

  if(cmd=='B'){  

  var r=confirm('是否确认向终端 '+ code +' 发送休眠指令?');

  }    

  if(cmd == 'D'){   

 var r=confirm('是否确认向终端 '+ code +' 发送唤醒指令?');

  }

  if(r==false){   

 return;  

 }  

//http://114.242.152.140:8085/portal-collect/sendOrders.htm?k='+Math.random();          

$.ajax({            

async:false,            

url:'http://11.205.32.63:8080/piccgeteway/sendOrders.htm?k='+Math.random(),        

//http://11.205.32.63:8080/piccgeteway/sendOrders.htm?equipId=004198003&command=M&value=123            

type: "GET",            

dataType: 'jsonp',            

jsonp: 'jsoncallback',            

timeout: 5000,            

data:{              

equipId:code,              

command:cmd,              

value:value            

},            

success:function(data){                

if (data.status == '0'){                    

   alert('指令发送失败,请检查设备。');               

  }else{                       

    alert('指令发送成功。');                

}              

 

//$("#message").html("status    :"+data.status);            

},error : function(data){              

alert("通信错误,请重新操作或者联系管理员!");            

},          

});

},  

 

 

 


 

<div /></td></tr>
</table>
</div>


1、textarea标签

2、select,option标签

3、<div><span></span><span></span></div> 

    <div>

   <table>

   <tr><td></td><td></td></tr>

   ......

   </table>

   </div>样式组织方式

4、<select onchange="$('#msg').val(this.value);"> 绑定事件处理方法,双引号-单引号写法,jquery的val方法

5、<input type="button" value="发送" onclick="Interface.sendMSG(equipcode,cmd,$('#msg').val());$('#dialog1').css({display:'none'});"/> input标签,jquery的css方法,绑定2个事件处理方法, jquery的ajax方法

6、<div >  标签的style属性

 

相关文章:

  • 2021-10-05
  • 2022-12-23
  • 2022-02-27
  • 2022-01-02
  • 2022-12-23
  • 2021-08-07
  • 2022-01-05
  • 2021-04-06
猜你喜欢
  • 2022-12-23
  • 2021-05-03
  • 2021-06-05
  • 2021-09-16
  • 2022-12-23
  • 2021-05-15
  • 2022-12-23
相关资源
相似解决方案