标签:nav rgb require describes ipad 显示 mode rri lda
@Override
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
Log.i("bqt", "【onConsoleMessage】" + "\nmessage=" + consoleMessage.message()
+ "\nlineNumber=" + consoleMessage.lineNumber()
+ "\nmessageLevel=" + consoleMessage.messageLevel() + "\nsourceId=" + consoleMessage.sourceId());
return super.onConsoleMessage(consoleMessage);
}
I/chromium: [INFO:CONSOLE(18)] "log日志", source: file:///android_asset/h5/JS%E5%BC%B9%E6%A1%86%E6%BC%94%E7%A4%BA.html (18)
I/chromium: [INFO:CONSOLE(19)] "warn日志", source: file:///android_asset/h5/JS%E5%BC%B9%E6%A1%86%E6%BC%94%E7%A4%BA.html (19)
I/chromium: [INFO:CONSOLE(20)] "error日志", source: file:///android_asset/h5/JS%E5%BC%B9%E6%A1%86%E6%BC%94%E7%A4%BA.html (20)
@Override
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
Log.i("bqt", "【onConsoleMessage】" + "\nmessage=" + consoleMessage.message()
+ "\nlineNumber=" + consoleMessage.lineNumber()
+ "\nmessageLevel=" + consoleMessage.messageLevel() + "\nsourceId=" + consoleMessage.sourceId());
return super.onConsoleMessage(consoleMessage);
}
<a href="https://www.taobao.com/" title="淘宝" target="_blank">新窗口打开链接</a>
webSettings.setSupportMultipleWindows(true);//支持多窗口。如果设置为true,主程序要实现onCreateWindow
@Override
public boolean onCreateWindow(WebView webView, boolean isDialog, boolean isUserGesture, Message resultMsg) {
Log.i("bqt", "【onCreateWindow】 " + isDialog + " " + isUserGesture + "\n详细信息" + resultMsg.toString());
if (activity != null) {
WebView childView = new WebView(activity);//Parent WebView cannot host it‘s own popup window.
childView.setBackgroundColor(Color.GREEN);
childView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
Log.i("bqt", "【shouldOverrideUrlLoading-子】");
activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
return true;
}
});
WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
transport.setWebView(childView);//setWebView和getWebView两个方法
resultMsg.sendToTarget();
return true;
} else return super.onCreateWindow(webView, isDialog, isUserGesture, resultMsg);//默认是returns false
}
public void invoke (String origin, boolean allow, boolean retain)
Sets the Geolocation permission state for the supplied origin.
Parameters
origin String: the origin for which permissions are set
allow boolean: whether or not the origin should be allowed to use the Geolocation API
retain boolean: whether the permission should be retained保留 beyond在...之内 the lifetime of a page currently being displayed by a WebView
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
android:configChanges="keyboardHidden|orientation|screenSize"
android:hardwareAccelerated="true"
private View mCustomView;//onShowCustomView传过来的view,其实就是我们构造的View
private CustomViewCallback mCustomViewCallback;//onShowCustomView传过来的callback
private FullscreenHolder videoFullView;//全屏播放视频时的根布局
// 播放网络视频时全屏会被调用的方法
@Override
public void onShowCustomView(View view, CustomViewCallback callback) {
Log.i("bqt", "【onShowCustomView】" + view.getClass().getSimpleName());//FrameLayout
if (view instanceof ViewGroup) {
ViewGroup vp = (ViewGroup) view;
Log.i("bqt", "【onShowCustomView】count=" + vp.getChildCount()
+ " type=" + vp.getChildAt(0).getClass().getSimpleName());//count=1 type=FullScreenView
}
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
if (mCustomView == null) {
mCustomView = view;
mCustomViewCallback = callback;
videoFullView = new FullscreenHolder(activity);
videoFullView.addView(mCustomView);
((FrameLayout) activity.getWindow().getDecorView()).addView(videoFullView);
} else callback.onCustomViewHidden();
}
// 视频播放退出全屏会被调用的
@Override
public void onHideCustomView() {
Log.i("bqt", "【onHideCustomView】");
// 是全屏播放状态
if (videoFullView != null && mCustomView != null && mCustomViewCallback != null) {
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
videoFullView.removeView(mCustomView);
videoFullView.setVisibility(View.GONE);//这个不能省
mCustomView = null;
videoFullView = null;
mCustomViewCallback.onCustomViewHidden();
}
}
public boolean isOnShowCustomView() {
return mCustomView != null;
}
@Override
//设置当点击后退按钮时不是退出Activity,而是让WebView后退一页。也可以通过webview.setOnKeyListener设置
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (mWebChromeClient != null && mWebChromeClient.isOnShowCustomView()) {
mWebChromeClient.onHideCustomView();
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
return true;
} else if (webview.canGoBack()) {//返回网页上一页
webview.goBack(); //后退,goForward() 前进
return true;
} else {//退出网页
webview.loadUrl("about:blank");
finish();
}
}
return super.onKeyDown(keyCode, event);
}
<video width="100%p" height="150" controls="controls" poster="../icon.jpg">
<source src="http://qnfile.ogod.xin/_F-UBAMKr_AID.mp4" type="video/mp4"/>
</video>
//********************************************以下为5.0以上,上传文件相关代码*******************************************
private ValueCallback<Uri[]> mUploadMessageForAndroid5;
public static int FILECHOOSER_RESULTCODE_FOR_ANDROID_5 = 2;
@Override
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> uploadMsg, FileChooserParams params) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Log.i("bqt", "【onShowFileChooser】 5.0+" + " " + params.getMode() + " " + params.getTitle() + " "//Mode为0
+ params.isCaptureEnabled() + " " + params.getFilenameHint() + " " + Arrays.toString(params.getAcceptTypes()));
}
mUploadMessageForAndroid5 = uploadMsg;
Intent contentSelectionIntent = new Intent(Intent.ACTION_GET_CONTENT);
contentSelectionIntent.addCategory(Intent.CATEGORY_OPENABLE);
contentSelectionIntent.setType("image/*");//文件类型
Intent chooserIntent = new Intent(Intent.ACTION_CHOOSER);
chooserIntent.putExtra(Intent.EXTRA_INTENT, contentSelectionIntent);
chooserIntent.putExtra(Intent.EXTRA_TITLE, "图片选择");
activity.startActivityForResult(chooserIntent, FILECHOOSER_RESULTCODE_FOR_ANDROID_5);
return true;
}
//5.0以上,上传图片成功后的回调
public void mUploadMessageForAndroid5(Intent intent, int resultCode) {
Log.i("bqt", "【上传图片成功后的回调】 5.0+");
if (mUploadMessageForAndroid5 != null) {
Uri result = (intent == null || resultCode != RESULT_OK) ? null : intent.getData();
if (result != null) mUploadMessageForAndroid5.onReceiveValue(new Uri[]{result});
else mUploadMessageForAndroid5.onReceiveValue(new Uri[]{});
mUploadMessageForAndroid5 = null;
}
}
//*******************************************以下为5.0以下,上传文件相关代码***********************************************
private ValueCallback<Uri> mUploadMessage;
public static int FILECHOOSER_RESULTCODE = 1;
//The undocumented magic method override Eclipse will swear at you if you try to put @Override here
//undocumented:无正式文件的,无事实证明的;与…不协调,咒骂,发誓
// For Android 3.0-
@SuppressWarnings("unused")
public void openFileChooser(ValueCallback<Uri> uploadMsg) {
openFileChooserImpl(uploadMsg);
}
// For Android 3.0+
@SuppressWarnings("unused")
public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType) {
openFileChooserImpl(uploadMsg);
}
//For Android 4.1
@SuppressWarnings("unused")
public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType, String capture) {
openFileChooserImpl(uploadMsg);
}
//低版本上传文件代码
private void openFileChooserImpl(ValueCallback<Uri> uploadMsg) {
Log.i("bqt", "【openFileChooser】");
mUploadMessage = uploadMsg;
Intent i = new Intent(Intent.ACTION_GET_CONTENT);
i.addCategory(Intent.CATEGORY_OPENABLE);
i.setType("image/*");
activity.startActivityForResult(Intent.createChooser(i, "文件选择"), FILECHOOSER_RESULTCODE);
}
//5.0以下,上传图片成功后的回调
public void mUploadMessage(Intent intent, int resultCode) {
Log.i("bqt", "【上传图片成功后的回调】 5.0-");
if (mUploadMessage != null) {
if (intent != null && resultCode == RESULT_OK) mUploadMessage.onReceiveValue(intent.getData());
mUploadMessage = null;
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
Log.i("bqt", "【onActivityResult】 requestCode=" + requestCode + " resultCode=" + resultCode);
//上传图片之后的回调
if (requestCode == MyWebChromeClient.FILECHOOSER_RESULTCODE) {
mWebChromeClient.mUploadMessage(intent, resultCode);
} else if (requestCode == MyWebChromeClient.FILECHOOSER_RESULTCODE_FOR_ANDROID_5) {
mWebChromeClient.mUploadMessageForAndroid5(intent, resultCode);
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>图片上传预览</title>
<script type="text/javascript">
function imgPreview(fileDom){
//判断是否支持FileReader
if (window.FileReader) var reader = new FileReader();
else alert("您的设备不支持图片预览功能,如需该功能请升级您的设备!");
//获取文件
var file = fileDom.files[0];
var imageType = /^image\//;
//是否是图片
if (!imageType.test(file.type)) {
alert("请选择图片!");
return;
}
//读取完成
reader.onload = function(e) {
//获取图片dom
var img = document.getElementById("preview");
//图片路径设置为读取的图片
img.src = e.target.result;
};
reader.readAsDataURL(file);
}
</script>
</head>
<body>
<img id="preview" width="100%P"/>
<br/>
<input type="file" name="file" onchange="imgPreview(this)"/>
</body>
</html>
public class MyWebChromeClient extends WebChromeClient {
private WebViewActivity activity;//控件的显示和隐藏应该都由WebViewClient控制
public MyWebChromeClient(WebViewActivity activity) {
super();
this.activity = activity;
}
@Override
public void onProgressChanged(WebView view, int newProgress) {
Log.i("bqt", "【onProgressChanged】 " + newProgress);
if (activity.getProgress_bar() != null) activity.getProgress_bar().setProgress(newProgress);
super.onProgressChanged(view, newProgress);
}
@Override
public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
//If the client returns true, WebView will assume that the client will handle the dialog. Otherwise, it will continue execution执行.
boolean b = new Random().nextBoolean();
Log.i("bqt", "【onJsAlert】" + b + " " + url + " " + message);
if (b) return super.onJsAlert(view, url, message, result);//默认为return false,有弹窗
else {//拦截html中alert函数之后,我们可以在这里做任何自己的操作。我们还可以根据message来做不同的操作
Toast.makeText(view.getContext(), "onJsAlert,message=" + message, Toast.LENGTH_SHORT).show();
result.confirm();//confirm()表示点击了弹出框的确定按钮,cancel()则表示点击了弹出框的取消按钮。两者必须调用一个
return true;//如果return true,不弹出对话框了;否则,会继续弹出对话框
}
}
@Override
public boolean onJsConfirm(WebView view, String url, String message, JsResult result) {
boolean b = new Random().nextBoolean();
Log.i("bqt", "【onJsConfirm】" + b + " " + url + " " + message);
//return super.onJsConfirm(view, url, message, result);//默认为return false,有弹窗
Toast.makeText(view.getContext(), "onJsConfirm,message=" + message, Toast.LENGTH_SHORT).show();
result.confirm();
return b;//如果return true,不弹出对话框了;否则,会继续弹出对话框
}
@Override
public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult result) {
boolean b = new Random().nextBoolean();
Log.i("bqt", "【onJsPrompt】" + b + " " + url + " " + message + " " + defaultValue);
Toast.makeText(view.getContext(), "亲,请输入你的昵称", Toast.LENGTH_SHORT).show();
return super.onJsPrompt(view, url, message, defaultValue, result);//默认为return false,有弹窗
}
@Override
public boolean onJsBeforeUnload(WebView view, String url, String message, JsResult result) {
boolean b = new Random().nextBoolean();
Log.i("bqt", "【onJsBeforeUnload】" + b + " " + url + " " + message);
return super.onJsBeforeUnload(view, url, message, result);
}
@Override
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
Log.i("bqt", "【onConsoleMessage】" + "\nmessage=" + consoleMessage.message()
+ "\nlineNumber=" + consoleMessage.lineNumber()
+ "\nmessageLevel=" + consoleMessage.messageLevel() + "\nsourceId=" + consoleMessage.sourceId());
return super.onConsoleMessage(consoleMessage);
}
@Override
public void onReceivedTitle(WebView view, String title) {
Log.i("bqt", "【onReceivedTitle 标题】" + title);
activity.getTv_title().setText(title);
super.onReceivedTitle(view, title);
}
@Override
public void onReceivedIcon(WebView view, Bitmap icon) {
Log.i("bqt", "【onReceivedIcon 图标】");
activity.getIv_icon().setVisibility(View.VISIBLE);
activity.getIv_icon().setImageBitmap(icon);
super.onReceivedIcon(view, icon);
}
@Override
public void onReceivedTouchIconUrl(WebView view, String url, boolean precomposed) {
//【url】The icon url. 【precomposed】True if the url is for a precomposed touch icon.
Log.i("bqt", "【onReceivedTouchIconUrl 苹果图标】" + precomposed + " " + url);
super.onReceivedTouchIconUrl(view, url, precomposed);
}
//获得所有访问历史项目的列表,用于链接着色。
@Override
public void getVisitedHistory(ValueCallback<String[]> callback) {
Log.i("bqt", "【getVisitedHistory 不知道怎么用】" + callback.toString());
super.getVisitedHistory(callback);
}
@Override
public boolean onCreateWindow(WebView webView, boolean isDialog, boolean isUserGesture, Message resultMsg) {
Log.i("bqt", "【onCreateWindow】 " + isDialog + " " + isUserGesture + "\n详细信息" + resultMsg.toString());
return super.onCreateWindow(webView, isDialog, isUserGesture, resultMsg);//默认是returns false
}
@Override
public void onCloseWindow(WebView window) {
Log.i("bqt", "【onCloseWindow】");
super.onCloseWindow(window);
}
@Override
public void onPermissionRequest(PermissionRequest request) {
Log.i("bqt", "【onPermissionRequest】");
//The host application must invoke grant(String[]) or deny(). If this method isn‘t overridden, the permission is denied拒绝.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Log.i("bqt", "Origin=" + request.getOrigin().toString() + " Resources=" + Arrays.toString(request.getResources()));
}
super.onPermissionRequest(request);
}
@Override
public void onPermissionRequestCanceled(PermissionRequest request) {
Log.i("bqt", "【onPermissionRequestCanceled】");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Log.i("bqt", "Origin=" + request.getOrigin().toString() + " Resources=" + Arrays.toString(request.getResources()));
}
super.onPermissionRequestCanceled(request);
}
@Override
public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
Log.i("bqt", "【onGeolocationPermissionsShowPrompt】" + origin);
//callback只有一个方法【public void invoke(String origin, boolean allow, boolean retain)】
super.onGeolocationPermissionsShowPrompt(origin, callback);
}
@Override
public void onGeolocationPermissionsHidePrompt() {
Log.i("bqt", "【onGeolocationPermissionsHidePrompt】");
super.onGeolocationPermissionsHidePrompt();
}
@Override
public void onRequestFocus(WebView view) {
Log.i("bqt", "【onRequestFocus】" + (view == activity.getWebview()));
super.onRequestFocus(view);
}
@Override
public Bitmap getDefaultVideoPoster() {
Log.i("bqt", "【getDefaultVideoPoster】");
return BitmapFactory.decodeResource(activity.getResources(), R.drawable.ic_launcher);
//return super.getDefaultVideoPoster(); //return null;
}
private ImageView loadingView;
// 视频加载时进程loading
@Override
public View getVideoLoadingProgressView() {
Log.i("bqt", "【getVideoLoadingProgressView】");
if (loadingView != null) return loadingView;
else {
loadingView = new ImageView(activity);
loadingView.setImageResource(R.drawable.icon);
return loadingView;
}
//else return super.getVideoLoadingProgressView();//return null;
}
//***************** ↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 以下为全屏播放视频相关代码 ↓↓↓↓↓↓↓↓↓↓↓↓↓ *******************
private View mCustomView;//onShowCustomView传过来的view,其实就是我们构造的View
private CustomViewCallback mCustomViewCallback;//onShowCustomView传过来的callback
private FullscreenHolder videoFullView;//全屏播放视频时的根布局
// 播放网络视频时全屏会被调用的方法
@Override
public void onShowCustomView(View view, CustomViewCallback callback) {
Log.i("bqt", "【onShowCustomView】" + view.getClass().getSimpleName());//FrameLayout
if (view instanceof ViewGroup) {
ViewGroup vp = (ViewGroup) view;
Log.i("bqt", "【onShowCustomView】count=" + vp.getChildCount()
+ " type=" + vp.getChildAt(0).getClass().getSimpleName());//count=1 type=FullScreenView
}
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
if (mCustomView == null) {
mCustomView = view;
mCustomViewCallback = callback;
videoFullView = new FullscreenHolder(activity);
videoFullView.addView(mCustomView);
((FrameLayout) activity.getWindow().getDecorView()).addView(videoFullView);
} else callback.onCustomViewHidden();
}
// 视频播放退出全屏会被调用的
@Override
public void onHideCustomView() {
Log.i("bqt", "【onHideCustomView】");
// 是全屏播放状态
if (videoFullView != null && mCustomView != null && mCustomViewCallback != null) {
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
videoFullView.removeView(mCustomView);
videoFullView.setVisibility(View.GONE);//这个不能省
mCustomView = null;
videoFullView = null;
mCustomViewCallback.onCustomViewHidden();
}
}
public boolean isOnShowCustomView() {
return mCustomView != null;
}
//***************** ↑↑↑↑↑↑↑↑↑↑↑↑↑↑ 以上为全屏播放视频相关代码 ↑↑↑↑↑↑↑↑↑↑↑↑↑ *******************
//********************************************以下为5.0以上,上传文件相关代码*******************************************
private ValueCallback<Uri[]> mUploadMessageForAndroid5;
public static int FILECHOOSER_RESULTCODE_FOR_ANDROID_5 = 2;
@Override
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> uploadMsg, FileChooserParams params) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Log.i("bqt", "【onShowFileChooser】 5.0+" + " " + params.getMode() + " " + params.getTitle() + " "//Mode为0
+ params.isCaptureEnabled() + " " + params.getFilenameHint() + " " + Arrays.toString(params.getAcceptTypes()));
}
mUploadMessageForAndroid5 = uploadMsg;
Intent contentSelectionIntent = new Intent(Intent.ACTION_GET_CONTENT);
contentSelectionIntent.addCategory(Intent.CATEGORY_OPENABLE);
contentSelectionIntent.setType("image/*");//文件类型
Intent chooserIntent = new Intent(Intent.ACTION_CHOOSER);
chooserIntent.putExtra(Intent.EXTRA_INTENT, contentSelectionIntent);
chooserIntent.putExtra(Intent.EXTRA_TITLE, "图片选择");
activity.startActivityForResult(chooserIntent, FILECHOOSER_RESULTCODE_FOR_ANDROID_5);
return true;
}
//5.0以上,上传图片成功后的回调
public void mUploadMessageForAndroid5(Intent intent, int resultCode) {
Log.i("bqt", "【上传图片成功后的回调】 5.0+");
if (mUploadMessageForAndroid5 != null) {
Uri result = (intent == null || resultCode != Activity.RESULT_OK) ? null : intent.getData();
if (result != null) mUploadMessageForAndroid5.onReceiveValue(new Uri[]{result});
else mUploadMessageForAndroid5.onReceiveValue(new Uri[]{});
mUploadMessageForAndroid5 = null;
}
}
//*******************************************以下为5.0以下,上传文件相关代码***********************************************
private ValueCallback<Uri> mUploadMessage;
public static int FILECHOOSER_RESULTCODE = 1;
//The undocumented magic method override Eclipse will swear at you if you try to put @Override here
//undocumented:无正式文件的,无事实证明的;与…不协调,咒骂,发誓
// For Android 3.0-
@SuppressWarnings("unused")
public void openFileChooser(ValueCallback<Uri> uploadMsg) {
openFileChooserImpl(uploadMsg);
}
// For Android 3.0+
@SuppressWarnings("unused")
public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType) {
openFileChooserImpl(uploadMsg);
}
//For Android 4.1
@SuppressWarnings("unused")
public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType, String capture) {
openFileChooserImpl(uploadMsg);
}
//低版本上传文件代码
private void openFileChooserImpl(ValueCallback<Uri> uploadMsg) {
Log.i("bqt", "【openFileChooser】");
mUploadMessage = uploadMsg;
Intent i = new Intent(Intent.ACTION_GET_CONTENT);
i.addCategory(Intent.CATEGORY_OPENABLE);
i.setType("image/*");
activity.startActivityForResult(Intent.createChooser(i, "文件选择"), FILECHOOSER_RESULTCODE);
}
//5.0以下,上传图片成功后的回调
public void mUploadMessage(Intent intent, int resultCode) {
Log.i("bqt", "【上传图片成功后的回调】 5.0-");
if (mUploadMessage != null) {
if (intent != null && resultCode == Activity.RESULT_OK) mUploadMessage.onReceiveValue(intent.getData());
mUploadMessage = null;
}
}
}
WebViewActivity.start(this, WebSettingsModel.newBuilder()
.url("file:///android_asset/h5/WebChromeClient演示.html")
.setJavaScriptEnabled(true)
.setDomStorageEnabled(true)//这句话必须保留,否则无法播放优酷网页视频,其他的可以
.setSupportMultipleWindows(true)
.setMixedContentMode(WebSettingsModel.MIXED_CONTENT_ALWAYS_ALLOW)//我觉得这个设置一般都很有必要
.setGeolocationEnabled(true)
.build());
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<button onclick="alert(‘alert弹框‘)">alert</button>
<button onclick="confirm(‘confirm弹框‘)">confirm</button>
<button onclick="prompt(‘prompt弹框‘,‘包青天‘)">prompt</button>
<p></p>
<button onclick="log()">调用console打印日志</button>
<button onclick="window.close()">关闭窗口</button>
<h2>链接</h2>
<a href="file:///android_asset/h5/test.html" title="新窗口" target="_blank">有target属性的链接</a>
<p></p>
<a href="http://v.youku.com/v_show/id_XODkxMjcyNzAw.html?spm=a2h1n.8251845.0.0" title="网页视频">没有target属性的链接,网页视频</a>
<p></p>
<a href="file:///android_asset/h5/uploadPic.html" title="图片上传预览">图片上传预览</a>
<h2>视频</h2>
ogod视频,没有poster属性
<p></p>
<video width="100%p" controls="controls">
<source src="http://qnfile.ogod.xin/_F-UBALyBRgEC.mp4" type="video/mp4"/>
</video>
ogod视频,有poster属性
<p></p>
<video width="100%p" controls="controls" poster="../icon.jpg">
<source src="http://qnfile.ogod.xin/_F-UBAMKr_AID.mp4"
type="video/mp4"/>
</video>
</body>
<script type="text/javascript">
function log(){
console.log("log日志");
console.warn("warn日志");
console.error("error日志");
}
</script>
</html>
标签:nav rgb require describes ipad 显示 mode rri lda
原文地址:http://www.cnblogs.com/baiqiantao/p/7390276.html