Javascript Windows Phone 7 Mango IE中的触摸事件

Javascript Windows Phone 7 Mango IE中的触摸事件,javascript,internet-explorer,windows-phone-7,Javascript,Internet Explorer,Windows Phone 7,WP7 Mango中的IE是否支持iOS或Android等触摸事件?触摸事件似乎将成为W3C的标准:。IE9说它遵循标准,有人知道它是否支持触摸事件吗?谢谢。它目前不支持触摸事件。这部分是不正确的。我在WindowsPhone7上开发。我已经实现了触摸效果 在这里,这适用于HTC HD7-移动版和桌面版。您可以看到下面的代码: <!DOCTYPE html> <html> <head> <meta http-equiv="content-typ

WP7 Mango中的IE是否支持iOS或Android等触摸事件?触摸事件似乎将成为W3C的标准:。IE9说它遵循标准,有人知道它是否支持触摸事件吗?谢谢。

它目前不支持触摸事件。

这部分是不正确的。我在WindowsPhone7上开发。我已经实现了触摸效果

在这里,这适用于HTC HD7-移动版和桌面版。您可以看到下面的代码:

<!DOCTYPE html>
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>jQuery Mobile Carousel Demo - jsFiddle demo by blackdynamo</title>
  <script type='text/javascript' src='http://code.jquery.com/jquery-1.4.4.min.js' jquery.mobile, carousel></script>
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.js"></script>
  <link rel="stylesheet" type="text/css" href="/css/normalize.css">
  <link rel="stylesheet" type="text/css" href="/css/result-light.css">
  <script type='text/javascript' src="https://github.com/blackdynamo/jQuery-Mobile-Carousel/raw/master/jquery.ui.ipad.js"></script>
  <script type='text/javascript' src="https://github.com/blackdynamo/jQuery-Mobile-Carousel/raw/master/jquery.mobile.carousel.js"></script>
  <style type='text/css'></style>
  <script type='text/javascript'>
  //<![CDATA[ 
  $(window).load(function(){
      (function($) {
        $("#carousel1").carousel();
        $("#carousel2").carousel({direction: "vertical"});
    })(jQuery);
  });
  //]]> 
  </script>
  </head>
  <body>
Horizontal
<div style="height: 300px; width: 500px">
    <ul id="carousel1" style="display: none;">
    <li>
        <div style="width: 100%; height: 100%; background-color:#381;">Page 1</div>
      </li>
    <li>
        <div style="width: 100%; height: 100%; background-color:#837;">Page 2</div>
      </li>
    <li>
        <div style="width: 100%; height: 100%; background-color:#999;">Page 3</div>
      </li>
    <li>
        <div style="width: 100%; height: 100%; background-color:#738;">Page 4</div>
      </li>
    <li>
        <div style="width: 100%; height: 100%; background-color:#142;">Page 5</div>
      </li>
    <li>
        <div style="width: 100%; height: 100%; background-color:#927;">Page 6</div>
      </li>
    <li>
        <div style="width: 100%; height: 100%; background-color:#987;">Page 7</div>
      </li>
    <li>
        <div style="width: 100%; height: 100%; background-color:#187;">Page 8</div>
      </li>
  </ul>
  </div>
Vertical
<div style="height: 300px; width: 500px">
    <ul id="carousel2" style="display: none;">
    <li>
        <div style="width: 100%; height: 100%; background-color:#381;">Page 1</div>
      </li>
    <li>
        <div style="width: 100%; height: 100%; background-color:#837;">Page 2</div>
      </li>
    <li>
        <div style="width: 100%; height: 100%; background-color:#999;">Page 3</div>
      </li>
    <li>
        <div style="width: 100%; height: 100%; background-color:#738;">Page 4</div>
      </li>
    <li>
        <div style="width: 100%; height: 100%; background-color:#142;">Page 5</div>
      </li>
    <li>
        <div style="width: 100%; height: 100%; background-color:#927;">Page 6</div>
      </li>
    <li>
        <div style="width: 100%; height: 100%; background-color:#987;">Page 7</div>
      </li>
    <li>
        <div style="width: 100%; height: 100%; background-color:#187;">Page 8</div>
      </li>
  </ul>
  </div>
</body>
</html>

jQuery移动转盘演示-blackdynamo的JSFIDLE演示
// 
水平的
  • 第1页
  • 第2页
  • 第3页
  • 第4页
  • 第5页
  • 第6页
  • 第7页
  • 第8页
垂直的
  • 第1页
  • 第2页
  • 第3页
  • 第4页
  • 第5页
  • 第6页
  • 第7页
  • 第8页

它目前支持无触摸事件。要证明这一点,您只需做以下简单的事情:

document.ontouchstart = function() { alert("TS"); }
document.ontouchmove = function() { alert("TM"); }
document.ontouchend = function() { alert("TE"); }

这些都不会在IE9 mobile中触发。

这个答案到底是什么意思?“这不是真的”不是一个答案——它可能是一个评论。该链接只是指向包含一些HTML和JS的页面。而且不是很多。如果该HTML是显示触摸事件工作的答案,那么将该HTML作为答案发布在此处。不要将我们发送到一个链接页面,该页面实际上没有显示它在手机上的工作情况。问题是关于WebBrowser对触摸事件的控制。用javascript中的鼠标事件模拟它们是不同的。JavaScript可以实现这种效果。那些手头有时间的人投了愚蠢的否决票。我不打算投赞成票或反对票,但我要顺便提一下,如果这有帮助的话,很明显,这对展示对触摸事件的支持毫无帮助(
touchstart
touchmove
,等等)。说它“部分有效”可能是雄心勃勃的。但是,嘿,jQuery旋转木马工作真是太好了。(完全不回答问题)谢谢trying@TheBlackBenzKid-如果你的答案获得了一个向上投票,那么它就不会“低于”或更长。如果其他人添加了一个答案,它将变得更加混乱。记住,这不是一个论坛。列出你的完整答案。如果你有评论,它应该是独立的。如果你不同意一个答案,那就是为什么会有否决票的选择。