Does anybody know a script that is 开发者_如何学Pythonsimilar to this:
http://simplythebest.net/scripts/DHTML_scripts/javascripts/javascript_49.html
but only not with input fields, but with options, Yes / No.
No but it would be pretty easy to write one... extremely simplified example below:
<script type="text/javascript">
var product1price = 85;
var product2price = 23;
function CalculatePrice()
{
    var totalprice = 0;
    if (document.getElementById('product1select').value == "yes")
    {
        totalprice += product1price;
    }
    if (document.getElementById('product2select').value == "yes")
    {
        totalprice += product2price;
    }
    document.getElementById('pricesum').innerHTML = totalprice;
}
</script>
<select id="product1select"><option value="yes">Yes</option><option value="">No</option></select>
<br><select id="product2select"><option value="yes">Yes</option><option value="">No</option></select>
<br>Total Price: <span id="pricesum">0</span>
<br><button onclick="CalculatePrice()">Get Price</button>
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论