首页 技术 正文
技术 2022年11月6日
0 收藏 781 点赞 876 浏览 2279 个字
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{$data.title}</title>
<meta name="viewport" content="user-scalable=no,width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<style type="text/css">
html {
font-size: 62.5%;/*10 ÷ 16 × 100% = 62.5%*/
}
body {
font-size: 14px;;
margin: 0 auto;
font-weight: bold;
overflow-x: hidden;
letter-spacing: 0.1rem;/*1.4 × 10px = 14px */
padding:10px;
line-height:26px;
background: rgb(230,230,230);
color: #666666;
}
h1 {
font-size: 2.4rem;/*2.4 × 10px = 24px*/
}
h3 {
font-size: 1.8rem;
}
#buttons a{border: 1px solid #FF4500;color:#FF4500; text-decoration: none; padding: 5px;}
</style></head>
<body>
<div class="banner">
<img src="http://service.zx7c.cn/2013/{$data.image}">
</div>
<p>
<script>
window.onerror = function(err) {
log('window.onerror: ' + err)
}
function connectWebViewJavascriptBridge(callback) {
if (window.WebViewJavascriptBridge) {
callback(WebViewJavascriptBridge)
} else {
document.addEventListener('WebViewJavascriptBridgeReady', function() {
callback(WebViewJavascriptBridge)
}, false)
}
} connectWebViewJavascriptBridge(function(bridge) {
var uniqueId = 1
function log(message, data) {
// var log = document.getElementById('log')
// var el = document.createElement('div')
// el.className = 'logLine'
// el.innerHTML = uniqueId++ + '. ' + message + ':<br/>' + JSON.stringify(data)
// if (log.children.length) { log.insertBefore(el, log.children[0]) }
// else { log.appendChild(el) }
}
bridge.init(function(message, responseCallback) {
log('JS got a message', message)
var data = { 'Javascript Responds':'Wee!' }
log('JS responding with', data)
responseCallback(data)
}) bridge.registerHandler('testJavascriptHandler', function(data, responseCallback) {
log('ObjC called testJavascriptHandler with', data)
var responseData = { 'Javascript Says':'Right back atcha!' }
log('JS responding with', responseData)
responseCallback(responseData)
}) //测试回调
var callbackButton = document.getElementById('buttons')
callbackButton.onclick = function(e) {
e.preventDefault()
log('JS calling handler "testObjcCallback"') bridge.callHandler('testObjcCallback', {'m_id': '<php>echo $data["m_id"];</php>'}, function(response) {
log('JS got response', response)
})
}
})
</script>
{$data.content}
</p>
<if condition="$data['m_id'] neq 0">
<div id='buttons'>价格:500元 <a href="#" rel="external nofollow" >查看详情</a><div id='log'></div> </div>
</if>
</body>
</html>

  

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,082
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,557
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,406
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,179
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,815
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,898