在Windows Phone中使用输入类型文本后无法加载 [英] Can't load after using input type text in windows phone
问题描述
我的Windows手机应用程序有问题。我使用cordova模板构建应用程序,并使用visual studio 2012 express for windows phone。
Hi, i have a problem in my windows phone app. I build the app with cordova template and using visual studio 2012 express for windows phone.
这里是index.html代码:
Here the index.html code :
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<title>Hello World</title>
</head>
<body>
<script src="js/index.js" type="text/javascript"></script>
<div id="content"></div>
<hr>
<div id="writehere"></div>
</hr>
<a href="javascript:void(0)" onclick="btn_click('Tombol1')">Button 1</a>
<a href="javascript:void(0)" onclick="btn_click('Tombol2')">Button 2</a>
<a href="javascript:void(0)" onclick="tambahform()">Button 3</a>
</body>
</html>
index.js代码:
index.js code :
var looping = 10;
var loopcount = 0;
function btn_click(val) {
var url = 'http://192.168.1.209/wp/';
if(val == 'Tombol1'){
document.getElementById('writehere').innerHTML = '';
url = 'http://192.168.1.209/wp/index.php';
}else if(val == 'Tombol2'){
document.getElementById('writehere').innerHTML = '';
url = 'http://192.168.1.209/wp/index2.php';
}else if(val == 'Tombol3'){
url = 'http://192.168.1.209/wp/index3.php';
}
script = document.createElement('script');
script.setAttribute('type', 'text/javascript');
script.setAttribute('src', url );
document.getElementById('content').appendChild(script);
writeresult();
}
function writeresult(){
if(typeof abc === "undefined" || abc === null){
if(loopcount < looping){
setTimeout( "writeresult()", 500 );
loopcount++;
}else{
document.getElementById('writehere').innerHTML += 'not found';
loopcount = 0;
}
}else{
document.getElementById('writehere').innerHTML += abc;
loopcount = 0;
abc = null;
}
}
function tambahform(){
//document.getElementById('writehere').innerHTML = '<input type="text" value="inputtypetext"></input>'
document.getElementById('writehere').innerHTML = '<textarea>textarea</textarea>'
btn_click('Tombol3');
}
我从index.php获取数据。
I get data from index.php.
<?php
echo "var abc ='good morning';";
?>
index2.php
index2.php
<?php
echo "var abc ='good evening';";
?>
index3.php
index3.php
<?php
echo "var abc ='good night';";
?>
,结果是:
我的问题是当在函数tambahform()的index.js中,如果我使用input type =" text",它将显示:
My problem is when in index.js at function tambahform() if i use input type = "text", it will show :
请帮我看看如何使用输入类型文字,密码(在这种情况下:输入类型无线电/清单其OKAY)在这个应用程序,所以我可以使用输入类型。谢谢
Please help me how to use input type text,password (in case:input type radio/checklist its OKAY) in this app so i can use input type. Thanks
推荐答案
嗨Rendy,
Hi Rendy,
你需要去科尔多瓦寻求帮助他们的图书馆。 我可以告诉你如何使用直接的HTML和JavaScript来做事情,但我们不支持Cordova库,因为它是第三方。
You will need to go to Cordova to get help with their libraries. I can tell you how to do things using straight HTML and JavaScript but we do not support Cordova libraries since it is a 3rd party.
这篇关于在Windows Phone中使用输入类型文本后无法加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!