Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $x=1;
- while($x<3)
- {
- $id=strval($x);
- echo '
- <form>
- <input type="text" id="'.$id.'" value="'.$id.'">
- <input type="text" id="2_'.$id.'">
- </form>
- ';
- $x+=1;
- ?>
- <script type="text/javascript">
- pr_id(<?php echo $id; ?>,<?php echo "2_".$id; ?>);
- </script>
- <?PHP
- }
- ?>
- <script>
- function pr_id(f_id,s_id)
- {
- // some code on value of element that have id f_id
- // set result to value of element that have id s_id
- }
- </script>`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement