修改js判断指定字符串是否含有指定子串不正确的问题

This commit is contained in:
sw 2014-10-25 15:36:26 +08:00
parent 54e8df06cd
commit 9707049703
2 changed files with 9 additions and 9 deletions

View File

@ -14,10 +14,10 @@
<script type="text/javascript">
function get_options(value) {
prefix = '';
if(location.href.contains('ros'))
var prefix = "";
if(location.href.indexOf('ros')>=0)
{
prefix = '/ros'
prefix = "/ros"
}
$.ajax({
type: "POST",

View File

@ -2,8 +2,8 @@
<script type="text/javascript">
$(document).ready(function() {
prefix = '';
if(location.href.contains('ros'))
var prefix = '';
if(location.href.indexOf('ros') >= 0)
{
prefix = '/ros'
}
@ -22,8 +22,8 @@
<script type="text/javascript">
function get_school(value){
prefix = '';
if(location.href.contains('ros'))
var prefix = '';
if(location.href.indexOf('ros') >= 0)
{
prefix = '/ros'
}
@ -54,8 +54,8 @@
alert("<%= l(:label_search_conditions_not_null) %>");
return;
}
prefix = '';
if(location.href.contains('ros'))
var prefix = '';
if(location.href.indexOf('ros') >= 0)
{
prefix = '/ros'
}