HOW TO DO IT, WHEN “onclick="secBoard2(0)” , THEN PHP request

This is a discussion on HOW TO DO IT, WHEN “onclick="secBoard2(0)” , THEN PHP request within the PHP General forums, part of the PHP Programming Forums category; 求教]PHP变量$secmeth怎么获取JS内的secBoard2[n]的值? HOW TO DO IT, WHEN “onclick="secBoard2(0)” , THEN PHP request the value that ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-25-2006
changker@gmail.com
 
Posts: n/a
Default HOW TO DO IT, WHEN “onclick="secBoard2(0)” , THEN PHP request

求教]PHP变量$secmeth怎么获取JS内的secBoard2[n]的值?
HOW TO DO IT, WHEN “onclick="secBoard2(0)” , THEN PHP request
the value that is secBoard2(n) .
IF USE XMLHTTPREQUEST , HOW TO DO ?


THE CODE:
================================================
<script language=&#106avascript>
function secBoard2(n)
{
for(i=0;i<secTable2.cells.length;i++)
secTable2.cells.className="sec3";
secTable2.cells[n].className="sec4";
for(i=0;i<mainTable2.tBodies.length;i++)
mainTable2.tBodies.style.display="none";
mainTable2.tBodies[n].style.display="block";

<?php $secmeth =
secBoard2[n];//问题的关键点,怎么获取secBoard2[n]的值??>
}
</script>


<table id="mainTable2">
<tr>
<td onclick="secBoard2(0)">i is 0</td>
<td onclick="secBoard2(1)">i is 1</td>
<td onclick="secBoard2(2)">i is 2</td>
<td onclick="secBoard2(3)">i is 3</td>
</tr>
<tbody>
<tr>
<td>
i is 0
</td>
</tr>
</tbody>
<tbody>
<tr>
<td>
i is 1
</td>
</tr>
</tbody>
<tbody>
<tr>
<td>
i is 2
</td>
</tr>
</tbody>
<tbody>
<tr>
<td>
i is 3
</td>
</tr>
</tbody>
</table>
<?php
echo $secmeth ; //display 0 or 1 or 2 or 3
?>

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:10 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0