2017-04-11 46 views
0

什麼將是這個的Javascript嵌套行情不明確

"javascript:window.open('http://localhost:9000/index.html#/mypage/detailspage\', 
'details-page','width=300,height=250');" 

這個我試過了嵌套行情不工作

"javascript:window.open(\'http://localhost:9000/index.html#/mypage/detailspage\', 
\'details-page\',\'width=300,height=250\');" 
+0

'「的javascript:window.open('HTTP://本地主機:9000/index.html的#/我的空間/ detailspage', 'details-page','width = 300,height = 250');「'不是嗎? –

+0

a =「javascript:window.open(\'http:// localhost:9000/index.html#/ m ypage/detailspage \'」 –

+0

a =「javascript:window.open(\'http:// localhost :9000/index.html#/ m ypage/detailspage \'「這個工作正常在鉻我檢查 –

回答

0

感謝球員的答覆,但它現在正在爲我工​​作。其實我的要求是,從我的應用程序,我將價值作爲發佈請求傳遞給該應用程序中的另一個應用程序,我無法看到我的代碼,因爲我正在發送它。下面的例子

<input type="hidden" name="value11" id="value11" ng-model="indexedArray[34]" value="javascript:window.open('http://localhost:9000/index.html#/abc/details-page\' ,\'details-page\',\'width=300,height=250\'');" autocomplete="off" class="ng-pristine ng-untouched ng-valid ng-empty">

對此我得到這個

<a href="javascript:window.open(" http: localhost:9000 index.html# abc details-page' ' target="_blank"></a>

0

var y="javascript:window.open('http://localhost:9000/index.html#/mypage/detailspage\' ,\'details-page\',\'width=300,height=250\'')"; 
 
alert(y);

這工作正常,在瀏覽器中我猜測。