关于window.open('')带参加跳转问题.
<input type="button" value="删除" onclick="window.open('http://localhost/CodeIgniter/index.php/index/delete/'+ $row->id,'a2')">问题是带参后无法跳转.难道是我写错了?我测试过,$row->id是可以获取到值.这点不存在问题.
<input type="button" value="删除" onclick="window.open('http://localhost/CodeIgniter/index.php/index/delete/'+ 4,'a2')">
这样可以在跳转后页面显示出值4.
不知道怎么在这样的情况下,带参跳转...有用的、研究过的朋友吗? 你穿插了PHP代码,没写<?php ?>
<input type="button" value="删除" onclick="window.open('http://localhost/CodeIgniter/index.php/index/delete/'+<?php echo$row->id ?>,'a2')">
不过建议你写分离式Javascript 重庆PHP社区 发表于 2011-10-23 02:33 static/image/common/back.gif
你穿插了PHP代码,没写
太谢谢你了。{:soso_e181:} 真是太大意了.忽略掉了关键.知道要+号了还...
其实还可以用<?php form_open('')?>
<input type="submit" value="删除" name="del" />
以后多交流...{:soso_e183:}再次感谢。
沙发高手啊,佩服!
页:
[1]