Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jquery函数未发出警报字符串_Jquery_Xml_Ajax - Fatal编程技术网

jquery函数未发出警报字符串

jquery函数未发出警报字符串,jquery,xml,ajax,Jquery,Xml,Ajax,无法提醒讲师 这是因为字符串参数周围没有引号 替换这个 function i_click(instructorName) { alert(instructorName); } 与 这会解决你的问题 function i_click(instructorName) { alert(instructorName); } <input type='button' id='instructorButton'

无法提醒讲师

这是因为字符串参数周围没有引号

替换这个

 function i_click(instructorName)
{
    alert(instructorName);
    }


这会解决你的问题

 function i_click(instructorName)
{
    alert(instructorName);
    }
<input type='button' id='instructorButton' 
                         onclick='i_click("+instructorName+")' value='ADD' />
<input type=\"button\" id=\"instructorButton\" 
       onclick=\"i_click('" +instructorName +"')\" value=\"ADD\" />