Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/410.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript (); }); $(document).on(`mouseenter`、`.order`、function()){ $(`.order`).css(`background`、`white`); $(this.css(`background`、`lightblue`); }); $(document).on(`mouseexit`、`.order`、function()){ $(this.css(`background`、`white`); }); $(文档).on(`click`,函数(e){ console.log(e.target.id); $(`orderSelect`).hide(); });_Javascript_Html_Jquery_Select_Click - Fatal编程技术网

Javascript (); }); $(document).on(`mouseenter`、`.order`、function()){ $(`.order`).css(`background`、`white`); $(this.css(`background`、`lightblue`); }); $(document).on(`mouseexit`、`.order`、function()){ $(this.css(`background`、`white`); }); $(文档).on(`click`,函数(e){ console.log(e.target.id); $(`orderSelect`).hide(); });

Javascript (); }); $(document).on(`mouseenter`、`.order`、function()){ $(`.order`).css(`background`、`white`); $(this.css(`background`、`lightblue`); }); $(document).on(`mouseexit`、`.order`、function()){ $(this.css(`background`、`white`); }); $(文档).on(`click`,函数(e){ console.log(e.target.id); $(`orderSelect`).hide(); });,javascript,html,jquery,select,click,Javascript,Html,Jquery,Select,Click,小提琴:可以使用,因为它会在窗口失去焦点时点火 $(window).on(`blur`, function(e) { $(`#orderSelect`).hide(); }); 天啊。当然成功了。谢谢。我还在div上放了一个tabindex和onblur,它复制了所有内容,使它像一个标准的select元素。 $(window).on(`blur`, function(e) { $(`#orderSelect`).hide();

小提琴:

可以使用,因为它会在窗口失去焦点时点火

    $(window).on(`blur`, function(e) {
        $(`#orderSelect`).hide(); 
    });

天啊。当然成功了。谢谢。我还在div上放了一个tabindex和onblur,它复制了所有内容,使它像一个标准的select元素。
    $(window).on(`blur`, function(e) {
        $(`#orderSelect`).hide(); 
    });