新增异常处理机制,页面语音设置,网络设置
This commit is contained in:
@ -1,12 +1,141 @@
|
||||
<html lang="zh-CN">
|
||||
<p id='p'>hello world</p>
|
||||
<button onclick="VoiceEngine.startSpeaking('js调用安卓方法!')">调用安卓方法</button>
|
||||
|
||||
<script>
|
||||
function render(result){
|
||||
result+="<br/>"
|
||||
document.getElementById("p").innerHTML += result
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="keywords" content=""/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
|
||||
<meta name="format-detection" content="telephone=no"/>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="author" content="CSS5, css5.com.cn"/>
|
||||
<style>
|
||||
html, body {
|
||||
font-family: "Microsoft YaHei", Arial;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
background: #f7f8fa;
|
||||
color: #555;
|
||||
font-size: 14px;
|
||||
}
|
||||
</script>
|
||||
|
||||
</html>
|
||||
.context {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.main {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.net {
|
||||
margin: 10px;
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.net-list {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.net-list label {
|
||||
width: 110px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.net-list input {
|
||||
border: 0;
|
||||
flex: 1;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #323233;
|
||||
line-height: inherit;
|
||||
text-align: left;
|
||||
background-color: transparent;
|
||||
resize: none;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.net-list input:focus {
|
||||
outline: -webkit-focus-ring-color auto 0px;
|
||||
}
|
||||
|
||||
.operation {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.operation button {
|
||||
margin: 10px;
|
||||
border-radius: 5000px;
|
||||
height: 40px;
|
||||
border: 0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.operation button:focus {
|
||||
outline: -webkit-focus-ring-color auto 0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<script>
|
||||
function saveSetting(){
|
||||
var data=JSON.stringify({
|
||||
"address":document.getElementById('address').value,
|
||||
"port":document.getElementById('port').value,
|
||||
"path":document.getElementById('path').value
|
||||
});
|
||||
window.NetworkSettingEngine.save(data);
|
||||
window.View.reload();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="context">
|
||||
<div class="main">
|
||||
<div class="net">
|
||||
<div class="net-list">
|
||||
<label>服务器地址</label>
|
||||
<input id="address" name="address" placeholder="ip地址或者域名地址">
|
||||
</div>
|
||||
<div class="net-list">
|
||||
<label>服务器端口号</label>
|
||||
<input value="-1" id="port" name="port" placeholder="服务器端口号">
|
||||
</div>
|
||||
<div class="net-list">
|
||||
<label>访问子路径</label>
|
||||
<input id="path" name="path" placeholder="访问子路径">
|
||||
</div>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<button style="background: #1989fa;" onclick="saveSetting()">保存</button>
|
||||
<button style="background: #fff; color: #333">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user