以下javascript函数中的Unterminated String Constant Error.请帮助 [英] Unterminated String Constant Error in the following javascript function.Please help

查看:166
本文介绍了以下javascript函数中的Unterminated String Constant Error.请帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<script type="text/javascript">
function valid()
{
    alert("hi");
    var a=document.f1.fname.value;// text box value
        if(a==null ||a=="")
            {
            alert("Please Enter your FirstName !");
            return false;
                }
    <%Scanner s = new Scanner(new File(
        "dict.Dic"));
ArrayList<String> list = new ArrayList<String>();
while (s.hasNext()) {
    list.add(s.next());
}
s.close();
for (String content:list) {%>
//var li="ji";
alert(<%=content%>);

return false;
<%}%>
return true;
}
</script>

推荐答案

您没有给我们提供太多信息来使用,但是错误意味着字符串常量缺少其结束引号.意思是这样的:

a =''这在这里缺少引号->
b =还在此处缺少引号->

祝你好运!
You don''t give us much information to work with, but the error means that a string constant is missing its end quote. Meaning that it is something like:

a=''this is missing a quote here ->
b="also missing a quote here ->

Good luck!


这篇关于以下javascript函数中的Unterminated String Constant Error.请帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆