js搞定域名包含工程名,測試環境生產環境訪問url不一樣
window.location.protocol+'//'+window.location.hostname+(window.location.port?':'+window.location.port:'')+(/http(s)?:\/\/[^\/]+\/([^\/:]+)\//.test(window.top.location.href)?('/'+RegExp.$2):'')
var href = window.location.protocol+'//'+window.location.hostname+(window.location.port?':'+window.location.port:'')+(/http(s)?:\/\/[^\/]+\/([^\/:]+)\//.test(window.top.location.href)?('/'+RegExp.$2):'')
+'/acc.do?' +
'id=' + p.id;
window.open(href, '_blank');
相關推薦
js搞定域名包含工程名,測試環境生產環境訪問url不一樣
window.location.protocol+'//'+window.location.hostname+(window.location.port?':'+window.location.port:'')+(/http(s)?:\/\/[^\/]+\/([^\/:]+
Windows 10安裝TensorFlow-gpu1.4 及CUDA8.0,cuDNN6.0,搞定了,包含安裝方法和下載路徑
Windows 10安裝TensorFlow-gpu1.4 及CUDA8.0,cuDNN6.0,搞定了 先說下我的最終版本: Python 3.5.3; tensorflow-gpu==1.4.0 ; CUDA Toolkit 8.0 GA1 (Sept 2016),&nb
一篇搞定所有的python異常,沒有十年的功底做得到?
一:加小編QQ群:865597862獲取Python視訊教程以及各類PDF! 異常即是一個事件,該事件會在程式執行過程中發生,影響了程式的正常執行。 一般情況下,在python無法正常處理程式時就會發生一個異常(異常是python物件,表示一個錯誤) 異常就是程式執行時候發生錯誤的
怎麼把橫版視訊剪成豎版?兩種方法快速搞定!畫面滿屏,沒有黑邊
現在很多手機社交媒體上,都比較流行豎版視訊。那麼橫版視訊如何變成豎版?今天教大家兩種方法快速搞定!橫版改成豎屏,並且做到畫面滿屏,無黑邊。順便還會分享現在抖音、朋友圈、影視圈最流行的豎版視訊排版方式的製作技巧。 方法1:利用愛剪輯將橫版視訊剪成豎版,效果酷炫讓你立馬拿到超多贊 第一步:開
手把手教你用一個二維碼搞定微信防封,親測有效
今天要分享的是用一個二維碼成功實現微信防封的經驗,別不信,已經有不少人都用過了。 適合人群:擔心自己的微訊號、微信群被封的人群,比如做微商、代理、淘寶客的群主。 目標:幫助這部分人群避免被封號封群。 其實,這個防封的原理和過程很簡單,就是把風險轉移出去,不在微信裡涉及敏感話題內容。
android studio gradle打包,怎麼樣通過打不同的包名所依賴的專案不同,即所生成的apk大小不一樣呢(每個apk不包含所有的依賴的專案)
問題:gradle打包,怎麼樣通過打不同的包名所依賴的專案不同,即所生成的apk大小不一樣呢(每個apk不包含所有的依賴的專案)??? 解決:通過修改build.gradle檔案中 在android{}新增如下程式碼: 在dependencies{}中新增 “F
輕鬆搞定StoaryBoard / Xib多語言,App內切換多語言【轉】
轉自:https://www.jianshu.com/p/c89ed91df634 本文會用gif詳細演示如何支援多語言,如何輕鬆搞定StroaryBoard / Xib的多語言,以及App內切換多語言。最後 說下加上引數 和 引數順序的NSLocalizedString 首先讓程式支援
【開源】1句程式碼搞定圖片批量上傳,無需什麼程式碼功底【無語言界限】
/// <summary> /// 圖片上傳 /// </summary> /// <returns></returns> public JsonResult Upload(HttpPo
fsockopen被禁用,搞定discuz X2.5通訊,實現單點登入登出
空間安裝了discuz X2.5,安裝時提示fsockopen和pfsockopen函式被禁用,沒有理會繼續安裝,安裝過程沒出現錯誤但是進入後臺Ucenter卻發現通訊失敗,跟蹤了一下程式碼發現問題出現在uc_server/model/misc.php的9
Android自定義控制元件系列 十:利用新增自定義佈局來搞定觸控事件的分發,解決組合介面中特定控制元件響應特定方向的事件
這個例子是比較有用的,基本上可以說,寫完這一次,以後很多情況下,直接拿過來addView一下,然後再addInterceptorView一下,就可以輕輕鬆鬆的達到組合介面中特定控制元件來響應特定方向的觸控事件了。 在寫Android應用
解決win10創建Django工程,運行django-admin.py startproject 工程名,失敗的問題
默認 www 讀者 init djang 圖片 目錄 img ack 轉載自https://www.cnblogs.com/dadong616/p/4328292.html -------------------------------------------------
在vue中使用基於d3為基礎的dagre-d3.js搞定一個流程圖元件
專案中想搞定一個流程圖,開始使用了阿里的G6,但是G6目前不支援手勢,這樣就很鬱悶了,因為公司的領導都是使用iPad看的,你不支援手勢是不行的,後來又想到了百度的echarts,試了試,感覺還不錯,手機端也是沒問題的,但是用起來不是很好用,每個節點的位置還要自己去設定計算有點麻煩,所以想找個在支援pc和wap
大前端時代搞定PC/Mac端開發,我有絕招
如果你是一位前端開發工程師,對“跨平臺”一詞應該不會感到陌生。像常見的前端框架:比如React、Vue、Angular,它們可以做網頁端,也可以做移動端,但很少能做到跨PC、Mac端,也就是我們熟知的Windows、Linux以及macOS上的應用程式。即使有,受限於JS的效能瓶頸,當有大量的科學計算需求時,
如何實現訪問同一域名,手機和電腦跳轉的不一樣
mobile 頭部 ref oca pad www. 內核 user obi <script type="text/javascript"> var browser = { versions: function () {
tomcat、weblogic上不用專案名,直接通過ip+埠訪問。
weblogic在 專案路徑裡: 專案\WebRoot\WEB-INF\下,新建weblogic.xml,內容為: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE weblogic-web-app PUB
maven工程中,controller下寫了一個url請求,冒404
昨天在controll層寫了一請求,但是訪問該url,冒404,特別古怪的一個問題。大哥給了我一個反編譯class軟體(檢視eclipse的編譯結果) 去eclipse編譯資料夾下找到該class檔案,發現並沒有寫入進去。 首先我做了clean下編譯軟體,但是效果是並沒有
js獲取螢幕高度寬度解析度問題,當css3的@media查詢寫法不能解決問題時請看這個
當css的@media查詢寫法如下:@media screen and (max-width: 1920px) { .feature-table { height: 980px;background-color: #AAAAAA; }}@medi
一招搞定谷歌搜索、谷歌學術無法訪問的問題
con nim window 分享 track 技術分享 -h pla ogl 近期,谷歌搜索、谷歌學術“突然”無法訪問了?我百思不得其解啊,禁不住想問一下:前輩
JDK 9 發布僅數月,為何在生產環境中卻頻遭嫌棄?
至少 貨幣 性能 strong 第一個 啟動 fast 性能提升 ast 千呼萬喚始出來,在經歷了整整一年的跳票之後,Java 9 終於在 9 月 21 日撥開雲霧,露出真正的面目。對眾多 Java 程序員來說,這一天無疑是一個重大的日子,首先 Java 開發者們再也不
使用PPT演講時,兩個螢幕顯示的內容不一樣
使用PPT演講時,兩個螢幕顯示的內容不一樣 摘自:http://blog.sina.com.cn/s/blog_75f3150b01018f3l.html 參考1:https://jingyan.baidu.com/article/af9f5a2d14674f43140a45cd.html