Javascript 嵌套引号不明确
Javascript Nesting Quotes not clear
此
的嵌套引号是什么
"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\');"
var y="javascript:window.open('http://localhost:9000/index.html#/mypage/detailspage\' ,\'details-page\',\'width=300,height=250\'')";
alert(y);
我猜这在浏览器中工作正常。
感谢大家的回复,但它现在对我有用。实际上,我的要求是,从我的应用程序中,我将值作为 post 请求传递给该应用程序中的另一个应用程序,我在发送代码时看不到我的代码。下面是例子
<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>
此
的嵌套引号是什么"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\');"
var y="javascript:window.open('http://localhost:9000/index.html#/mypage/detailspage\' ,\'details-page\',\'width=300,height=250\'')";
alert(y);
我猜这在浏览器中工作正常。
感谢大家的回复,但它现在对我有用。实际上,我的要求是,从我的应用程序中,我将值作为 post 请求传递给该应用程序中的另一个应用程序,我在发送代码时看不到我的代码。下面是例子
<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>