调用地方
<input type="number" required="required" class="form-control" id="width" name="advertisingPlace.width" value="${advertisingPlace.width}" onblur="isValidate()"/>
我定义的函数
<script type="text/javascript">
$(function($){
show();
$('#edit_form').submit(function() {
var width = $('#width').val();
var height = $('#height').val();
if(width >999 || height >999){
bootbox.alert({
size: 'small',
message: "数据不可以超过4位"
});
return false;
}
return true;
});
});
function show(){
var placeId = ${advertisingPlace.placeId };
var parentId = $('#'+placeId).val();
var id = ${advertisingPlace.placeId };
if(parentId == placeId){
$('#'+id).hide();
}
}
function isValidate(){
var width = $('#width').val();
var height = $('#height').val();
if(width >999 || height >999){
bootbox.alert({
size: 'small',
message: "数据不可以超过4位"
});
}
}
</script>
总是提示isValidate函数未定义
Uncaught SyntaxError: Unexpected token ;
Uncaught ReferenceError: isValidate is not defined
请问各位大神,这个是怎么回事
javascript定义的函数调用时候总是未定义
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
8条回答
相关推荐 更多相似问题
点击登录
提问题
悬赏问题
- ¥15 使用DWY100k数据集对UEA进行测试,出现报错:IndexError: index 125000 is out of bounds for axis 0 with size 95500
- ¥15 前端vue实现根据图片url生成pdf文件
- ¥15 RfidReader资源Q个
- ¥20 user-agent是否是唯一的,有没有可能相同
- ¥15 关于#开会#的问题,如何解决?(语言-c++)
- ¥15 关于#二十四点问题#的问题
- ¥15 运行kitex的demon出错(求大家解决)
- ¥15 开发一个类似 typora 这样的软件需要多少钱?
- ¥15 clearcase7.0安装包
- ¥15 断点回归模型月度核密度检验不连续