解决方案 »
- getElementById放在head跟放在文档末尾处的问题
- 数组中删除元素
- JQuery 选择器 this的问题,请教!
- JavaScript 中 window.open() 问题 急急急!!
- 奇怪的问题,关于select的当前显示项
- 请教一个单选框的问题,急!
- 多维数组的问题,好像有个结症,想不通!请see see
- 如何取出一组checkbox的值,有一个或多个checkbox,checkbox动态生成的,多谢
- 一个爆简单的问题,成就我把
- js fetch promise对象 想返回成json对象 但是返回的是promise对象
- 选择器是变量,怎么获取其下某类元素?
- jquery slideDown()
('http://localhost/Elvescms/core/action/ListInfo.php classid=37&tempid=16&ph=1&year='+year.val()+'&month='+rq.val()
这样,对吗?应该这样吧?
('http://localhost/Elvescms/core/action/ListInfo.php?classid=37&tempid=16&ph=1&year='+year.val()+'&month='+rq.val()
我做了下测试:我把如下代码放在表单某项中提交到后台数据段中,
<table id="table" border="2">
<tr id="a" border="3">
<th> 工号 </th><th> 姓名 </th><script> document.write(showDL());</script><th>备注</th>
</tr>
<tr>
<td> 123</td> <td class=“name”> 11111 </td><script> document.write(STR);</script><td> 334 </td>
</tr>
</table>
因为上面的代码包含了换行,所以用ajax提出这个后,无法被eval解析。
然后我重新把<th> 工号 </th><th> 姓名 </th><script> document.write(showDL());</script><th>备注</th>作为字符串赋给这个字段,然后就可以正常地取出了。
后面我又把许多的代码去除换行后拼接在一起来处理,结果是正常的。说明是之前是因为代码中含有换行而导致不能解析。
大家可以尝试一下。如果这种说法有错误,麻烦帮我纠正一下。谢谢大家的帮忙。