初学者求指导!

WBOY
Release: 2016-06-13 12:48:24
Original
947 people have browsed it

菜鸟求指导!!
毕业生,毕业设计求教!可能有点长,真心希望帮忙!!谢谢!
由于不会用ajax所以有一下的事情发生

<br />
echo '<a onclick="cookin()" class="right" href="'.$url.'?'.$addurl[0].$addurl[1].$addurl[2].$addurl[3].'"></a>';
Copy after login


其实我是想做分页的,但一个页面有几个分页,
假设我点击第一个分页的按钮,成功分页后
(http://localhost/steak/delicioustour.php?page_c=2&
Copy after login

再点击第2个分页的按钮,那么第一个分页的内容就会改变了,第二个也可以成功分页
http://localhost/steak/delicioustour.php?page_t=2&
Copy after login

但我理想的url是
http://localhost/steak/delicioustour.php?page_c=2&page_t=2
Copy after login


因此我,在a标签哪里加了一个onclick,调用js函数,改变$addurl[0]的值
<br />
function cookre(){<br />
	alert('aa');<br />
        <?php $addurl[0]="page_c=".($pageval_cook-1)."&"; ?>				<br />
}<br />
			<br />
function cookin(){<br />
	<?php $addurl[0]="page_c=".($pageval_cook+1)."&"; ?><br />
	alert('bb');<br />
}<br />
Copy after login


但是我点击a标签的时候,没有调用到那个onclick的方法,不知道怎么写才能调用!!!求指导!
可能是语法的问题!!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template