代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Weex HTML5</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="format-detection" content="telephone=no, email=no" />
<meta name="viewport" content="width=750, user-scalable=no">
<style>
html, body, #weex {
width: 100%;
height: 100%;
}
</style>
<script src="./dist/browser.js"></script>
</head>
<body>
<div id="weex"></div>
<!-- entry -->
<script>
/**
* init weex instance depending on the url params.
* There are three ways to load weex bundles, depends on the
* parameter 'loader' in the url:
*
* + xhr: use XMLHttpRequest. Parameter 'page' should be
* the bundle's url.
* + jsonp: use jsonp. Parameter 'page' should be the request
* url and jsonpCallback should be specified during calling
* weex.init.
* + source: use the transformed code itself. 'page' should
* be the transformed weex bundle.
*
* @param {String} bundle It has different meaning depends on
* the type of loader.
*/
(function () {
function getUrlParam (key) {
var reg = new RegExp('[?|&]' + key + '=([^&]+)')
var match = location.search.match(reg)
return match && match[1]
}
var loader = getUrlParam('loader') || 'xhr'
var page = getUrlParam('page') || 'examples/build/index.js'
// jsonp callback name should be specified or be the default
// value 'weexJsonpCallback' if the 'jsonp' loader is used.
var JSONP_CALLBACK_NAME = 'weexJsonpCallback'
window.weex.init({
jsonpCallback: JSONP_CALLBACK_NAME,
appId: location.href,
loader: loader,
source: page,
rootId: 'weex',
// downgrade: ['root'] // 'root', 'list', 'scroller'
})
})();
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。