`
huangyongxing310
  • 浏览: 494152 次
  • 性别: Icon_minigender_1
  • 来自: 广州
文章分类
社区版块
存档分类
最新评论

longKey

    博客分类:
  • WEB
 
阅读更多
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Title</title>

    <script src="../miniui/scripts/jquery-1.11.1.min.js" type="text/javascript"></script>
    <script src="commonJs.js" type="text/javascript"></script>
<!--    <script src="../miniui/scripts/jquery-1.11.1.min.js" type="text/javascript"></script>-->

</head>
<body>
<!--<form>-->
<!--    <textarea id="advice13" name="advice13" rows="12"  placeholder="请填写审核意见"></textarea>-->
<!--</form>-->


<!--<input type="button" onclick="testFun()">-->


<!--<textarea id="textareaId2" name="advice13" rows="12"  placeholder="请填写审核意见"><p>&nbsp;123456一条</p><p>鱼鱼鱼</p></textarea>-->

<!--<div id="divId">同/n/r意test<br/>123456 -&#45;&#45; 陈景燕 -&#45;&#45; 2019-06-11 16:51:15</div>-->
<input value="12345567" type="button" id="night-sky" onclick="clickFun()" onTouch="onTouchFun">

<!--<input value="1234d5567" type="button"  onTouch="onTouchFun()">-->

<div style="width: 100px;height: 50px;background-color: #fffff8" onclick="clickFun()"></div>

<!--<div style="width: 100px;height: 50px;background-color: #fffff8"></div>-->

</body>



</html>


<script type="text/javascript">
    var timeOutEvent=0;
    var timeNum =0;



    function longPress(){
        console.info("timeNum ==" + timeNum);
        if(timeNum>=10){
            console.info("长按事件触发发");
        }
        timeNum=0;
        timeOutEvent = 0;
    }

    function clickFun(){
        console.info("clickFun");
        if(timeOutEvent==0){
            timeOutEvent = setTimeout("longPress()",5000);
            timeNum = timeNum+1;
        }else{
            timeNum = timeNum+1;
        }

    }

    function onTouchFun(){
        console.info("onTouchFun");
    }

//    function divSetClickNumEvent(selector,numSecond,numClick,eventFun) {
//        var obj={
//            timeOutEvent=0,
//                numClick =numClick,
//                numSecond=numSecond,
//
//
//        };
//
//        logDebug(selector,"selector");
//        logDebug(numSecond,"numSecond");
//        logDebug(numClick,"numClick");
//        logDebug(selector,"eventFun");
//
//        $(selector).click(function(){
//            $("p").slideToggle();
//        });
//
//
//        var temp = $(selector).prop("outerHTML");
//        return temp;
//    }





</script>








//post提交下载附件
function requestPost(url, parameters){
var _form = $("<form>");
_form.attr("style","display:none");
_form.attr("method","post");
_form.attr("action",url);
$("body").append(_form);
  for (var i = 0; i < parameters.length; i++) { 
  var obj = parameters[i];
  var _input=$("<input>");_input.attr("type","hidden");_input.attr("name",obj.name);_input.attr("value",obj.value);
_form.append(_input);
    } 
_form.submit();
}








分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics