因系统要兼容原IE已使用的关闭方法,经调试测得,需对window.dialogArguments进行再较验,不然易出问题. function OKEnd(vals) { if (vals == null) vals = "TRUE"; if (typeof (window.opener) == "undefined") { if (typeof (window.dialogArguments) != "undefined") { if (wind…
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Typ…
在Android项目中我们或多或少会涉及到与js交互的问题,这其中WebView是必须掌握的控件,今天主要说说我们通过WebView调用js方法,然后如何很好的获取返回值.这里我总结了三种方式,大家可根据需求选择. 一.Android版本在4.4及以上mWebView.evaluateJavascript("javascript:jsMethod()", new ValueCallback<String>() { @Override public void onReceiv…
最近在看js,正好公司用的框架中用到了模态窗口,以前没有接触过,现在把模态窗口的用法先记下来. 常用的浏览器chrome,Firefox,ie11,这三种分别支持document.open(),window.showModalDialog(),window.showModalDialog()的方式.下面还是直接给出代码,比较直观: motaichuangkou.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//E…
先看一段代码: function select(sqlscript){ var result = ""; sql.connect(config, function(err) { var request = new sql.Request(); request.query(sqlscript, function(err, recordset) { result = recordset; con…