Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Page 1</title>
- </head>
- <body>
- <div class="campaignstrategy">
- <h1>1. Campaign Strategy</h1>
- <input type="checkbox" name="awareness" id="awareness_checkbox" value="0.01">Awareness<br>
- <input type="checkbox" name="directresponse" id="directresponse_checkbox" value="0.01">Direct Response<br>
- <button id="next_page_button">Next Page</button>
- </div>
- <script
- src="https://code.jquery.com/jquery-3.4.1.min.js"
- integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
- crossorigin="anonymous">
- </script>
- <script>
- $('#next_page_button').click(function(){
- let table_info = [];
- $('.campaignstrategy input[type=checkbox]').each(
- function(index, value){
- if($(this).is(':checked')){
- table_info.push(
- {
- name: $(this).attr('name'),
- value: $(this).attr('value'),
- }
- );
- }
- });
- let base64str=btoa(JSON.stringify(table_info));
- window.location = "page2.html?table_data=" + base64str;
- });
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment