search

Home  >  Q&A  >  body text

javascript syntax error

I don’t understand the front-end, I encountered a small problem, no error was reported during use
But Adobe Dreamweaver CS6 prompted a syntax error

function sea(e,v) document.getElementById(e).value = v;

typechotypecho2744 days ago843

reply all(2)I'll reply

  • 天蓬老师

    天蓬老师2017-06-30 10:00:50

    JS functions need to use {} to enclose the function body, as follows:

    function sea(e,v) {document.getElementById(e).value = v;}

    reply
    0
  • 某草草

    某草草2017-06-30 10:00:50

    I guess you are missing the "{}" to wrap the function?

    reply
    0
  • Cancelreply