var apliay=document.getElementById('apliay_ok'); 代码里指定有>因为在获取此标签是div还没生成,所以取不到值 解决:把js放到 div下面就可以了 相关文章: