PDA

View Full Version : مشکل در برنامه نوشته شده با استفاده از cordova



parhamgmail
شنبه 10 تیر 1396, 13:23 عصر
با سلام و عرض خسته نباشید خدمت دوستان.
من یک برنامه خیلی ساده با cordova برای اندروید نوشتم که کارش اینه که فقط یک وبسایت رو توی یک iframe باز میکنه.
کد من به شرح زیره


<!DOCTYPE html><html> <head> <link rel="stylesheet" href="css/w3.css" /> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile.structure-1.4.5.min.css" /> <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> <meta name="format-detection" content="telephone=no"> <meta name="msapplication-tap-highlight" content="no"> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"> <link rel="stylesheet" type="text/css" href="css/index.css"> <title>شهر من</title> </head> <body> <div data-role="page" data-theme="a"> <div data-role="content" data-theme="a" id="theParent" style="height:100%; padding:0px; overflow:scroll !important;-webkit-overflow-scrolling:touch !important;"> <!--<button id="myBtn" onclick="gourl();"> go to url </button>--> <iframe style="width:100%; border:0px; height:100%;" scrolling="yes" frameborder="0" src="http://shahreman.biz" id="urlshow"> </iframe> <script> //document.getElementById("myBtn").addEventListener("click", gourl()); //var physicalScreenHeight = window.screen.height * window.devicePixelRatio; var physicalScreenHeight = window.innerHeight; //physicalScreenHeight=(physicalScreenHeight/100)*97; var heightiframe=physicalScreenHeight+"px" //alert(heightiframe); document.getElementById('urlshow').style.height=he ightiframe; function gourl() { document.getElementById('urlshow').src = 'http://shahreman.biz'; } </script> </div> </div> <script type="text/javascript" src="js/index.js"></script> </body></html>

و این هم مشکل من که توی تصویر مشاهده میکتید. این مشکل زمانی به وجود میاد که صفحه ی من اسکرول میخوره..
145655