发布网友
共2个回答
热心网友
//函数的写法,function是定义函数的关键字
function method(){
var test=false;//初始化
if ($('#manufacturename').val() == 'undefined') {
test = true;
} else {
test = false;
}
}
//如果加载时就运行,不需要函数,就直接在<script>节点中写,即把function这层去掉
热心网友
var test;
if ($('#manufacturename').val() == 'undefined') {
test = true;
} else {
test = false;
}