JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<div>
<input id="e1" type="checkbox"/>
<label for="e1">firstParam</label>
</div>
<div>
<input id="e2" type="checkbox"/>
<label for="e2">secondParam</label>
</div>
<div id="result"></div>
CSS
#result {
margin-top:50px;
background: #dcfffb;
color: #044f47;
padding: 10px;
font-size: 1em;
font-family: monospace !important;
text-align: left;
direction: ltr;
border: 1px dotted #9dd3cd;
display:none;
}
JavaScript
var string = '<!-- Offer Conversion: godaddy --> <iframe src="http://example.go2cloud.org/usr_l?offer_id=90" scrolling="no" frameborder="0" width="1" height="1"></iframe> <!-- // End Offer Conversion -->'
$('input').change(function(){
var $thisId = $(this).attr('id')
switch ($thisId) {
case "e1":
if ($(this).is(':checked')) {
// add: &e1=someValue
} else {
// remove: &e1=someValue
}
break;
case "e2":
if ($(this).is(':checked')) {
// add: &e2=someValue
} else {
// remove: &e2=someValue
}
break;
default:
}
$('#result').show().text(string)
})