javascript无法在bootstrap上运行 [英] javascript is not working on bootstrap
问题描述
大家好,
javascript无法使用bootstrap,
我的代码:
< script type = text / javascript language = javascript >
function ConfirmOnDelete( INVCODE){
if(确认(你确定要删除吗?)== true){
window.location =del.aspx?INVCODE =+ INVCODE +&DOIFI =+ 1;
返回true;
}
其他
返回false;
}
< / script >
它不会将我重定向到del.aspx页面,JUST window.open正在运行,其他选项是不工作......比如window.location.href等。
Plzzz建议我,怎么办。
最好的问候,
参考 - JavaScript中的Windows.location.href()和Window.open()方法 [ ^ ]。
Quote:
window .location.href
不是方法,它是一个告诉您浏览器当前URL位置的属性。将属性设置为不同的属性将重定向页面。
window.open()
是一种方法,你可以将URL传递给您要在新窗口中打开的URL。例如:
window.location.href 例如:
< span class =code-sdkkeyword> window 。 location .href = ' http://www.google.com跨度>; // 将带您进入Google。
window.open()示例:
window .open(< span class =code-string>' http://www.google.com'); // 这将在新窗口中打开Google。
附加信息:
window.open()
可以传递其他参数。请参阅: window.open教程 [ ^ ]
Hi guys,
javascript is not working on bootstrap,
my code:
<script type="text/javascript" language="javascript">
function ConfirmOnDelete(INVCODE) {
if (confirm("Are you sure you want to Delete?") == true) {
window.location = "del.aspx?INVCODE=" + INVCODE +"&DOIF=" + 1;
return true;
}
else
return false;
}
</script>
its not redirecting me to del.aspx page, JUST window.open is working, other options are not working...like window.location.href, etc.
Plzzz suggest me, what to do.
Best Regards,
Refer - Window.location.href () and Window.open () methods in JavaScript[^].
Quote:
window.location.href
is not a method, it's a property that will tell you the current URL location of the browser. Setting the property to something different will redirect the page.
window.open()
is a method that you can pass a URL to that you want to open in a new window. For example:
window.location.href example:
window.location.href = 'http://www.google.com'; //Will take you to Google.
window.open() example:
window.open('http://www.google.com'); //This will open Google in a new window.
Additional Information:
window.open()
can be passed additional parameters. See: window.open tutorial[^]
这篇关于javascript无法在bootstrap上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!