Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <?php
  2. $x=1;
  3. while($x<3)
  4. {
  5. $id=strval($x);
  6. echo '
  7. <form>
  8. <input type="text" id="'.$id.'" value="'.$id.'">
  9.  
  10. <input type="text" id="2_'.$id.'">
  11. </form>
  12. ';
  13. $x+=1;
  14. ?>
  15. <script type="text/javascript">
  16. pr_id(<?php echo $id; ?>,<?php echo "2_".$id; ?>);
  17. </script>
  18. <?PHP
  19. }
  20. ?>
  21.  
  22. <script>
  23.  
  24. function pr_id(f_id,s_id)
  25. {
  26.  
  27. // some code on value of element that have id f_id
  28.  
  29. // set result to value of element that have id s_id
  30. }
  31.  
  32. </script>`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement