Commit 812e3936 by liimin

open 添加target

1 parent 472b21ca
...@@ -22,10 +22,10 @@ util.title = function (titleText) { ...@@ -22,10 +22,10 @@ util.title = function (titleText) {
* @description 打开新页面 * @description 打开新页面
* @param {String} url 地址 * @param {String} url 地址
*/ */
util.open = function (url) { util.open = function (url,target) {
var a = document.createElement('a') var a = document.createElement('a')
a.setAttribute('href', url) a.setAttribute('href', url)
a.setAttribute('target', '_blank') a.setAttribute('target', target||'_blank')
a.setAttribute('id', 'd2admin-link-temp') a.setAttribute('id', 'd2admin-link-temp')
document.body.appendChild(a) document.body.appendChild(a)
a.click() a.click()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!