如何在javascript中设置标志 [英] How to set flag in javascript
问题描述
Var isConnected = false ;
$。connection.hub.start()。done( function ()
{
console .log(' 现已连接,连接ID =' + $ .connection.hub.id);.
});
function StartStream(mac,ip,port){
linkConditioningHubstart.server.startstreaming( mac,ip,port)
}
当我的时候页面加载集线器连接也加载。我设置一个标志
var isConnected = false;
现在如何使用标志检查连接是真还是假。
如果isConnected为真意味着我调用函数startstream方法。
其中使用那个标志以及如何设置真或假。
请帮助我....
< blockquote> .connection.hub.start()。done( function ()
{
console .log(' 现已连接,连接ID =' +
.connection.hub.id);。
});
function StartStream(mac,ip,port){
linkConditioningHubstart.server.startstreaming( mac,ip,port)
}
当我的时候页面加载集线器连接也加载。我设置一个标志
var isConnected = false;
现在如何使用标志检查连接是真还是假。
如果isConnected为真意味着我调用函数startstream方法。
其中使用那个标志以及如何设置真或假。
请帮助我....
Var isConnected = false;
$.connection.hub.start().done(function ()
{
console.log('Now connected, connection ID=' + $.connection.hub.id);.
});
function StartStream(mac,ip,port) {
linkConditioningHubstart.server.startstreaming(mac, ip, port)
}
Hi,
When my page load the hub connection is also loaded.I set one flag
var isConnected = false;
Now how to check connection is true or false using the flag.
if isConnected is true means i call the function startstream method.
Where to use that flag and how to set true or false.
Please Help Me....
.connection.hub.start().done(function () { console.log('Now connected, connection ID=' +
.connection.hub.id);. }); function StartStream(mac,ip,port) { linkConditioningHubstart.server.startstreaming(mac, ip, port) }
Hi,
When my page load the hub connection is also loaded.I set one flag
var isConnected = false;
Now how to check connection is true or false using the flag.
if isConnected is true means i call the function startstream method.
Where to use that flag and how to set true or false.
Please Help Me....
这篇关于如何在javascript中设置标志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!