VU HELP

Virtual University of Pakistan Study forum !

Assignment NO 02 of cs101

Upload the assignment after making some changes :

```”."">span class="start-tag">html> span class="start-tag">head> span class="start-tag">title>Weight Calculator</title>
span class="start-tag">script>  function check()
{ var x;   x = document.getElementById('in_kg').value;
if (isNaN(x) || x <= 0) {window.alert("Enter value grater than 0");}
else{var num;       num = x * 2.2046 ;  document.getElementById('pounds').value = num;
num = x * 1000 ;  document.getElementById('grams').value = num;     num = x * 1000000 ;
document.getElementById('mg').value = num;  num = x * 0.0011023 ;
document.getElementById('Us_ton').value = num;    num = x * 35.274 ;
span class="start-tag">body>   span class="start-tag">div align="center" style="margin-left: 40%; margin-right: 40%;">
span class="start-tag">div style="font-size: 35px; background-color:; color: green;">
Weight Converter</div>   span class="start-tag">p style="font-size: 20px; background-color blueviolet; margin: 7px;">
Welcome to the online converter</p>   </div>
span class="start-tag">form align="center">   span class="start-tag">table align="center">
span class="start-tag">tr>   span class="start-tag">td>   span class="start-tag">label>Weight in KG:</label>   </td>
span class="start-tag">td>   span class="start-tag">input type="number" name="kg" id="in_kg">
span class="start-tag">input type="button" name="submit" value="Convert" onclick="check()">
</td>   </tr>   span class="start-tag">tr>   span class="start-tag">td>   span class="start-tag">label>Weight In Pounds:</label>   </td>   span class="start-tag">td>
span class="start-tag">input type="number" name="in_g" id="pounds">   </td>   </tr>   span class="start-tag">tr>   span class="start-tag">td>
span class="start-tag">label>Grams:</label>   </td>   span class="start-tag">td>   span class="start-tag">input type="number" name="in_p" id="grams">
</td>   </tr>   span class="start-tag">tr>   span class="start-tag">td>   span class="start-tag">label>MilliGram:</label>   </td>   span class="start-tag">td>   span class="start-tag">input type="number" name="in_m" id="mg">   </td>   </tr>   span class="start-tag">tr>   span class="start-tag">td>   span class="start-tag">label>US Ton:</label>   </td>   span class="start-tag">td>   span class="start-tag">input type="number" name="in_t" id="Us_ton">   </td>   </tr>   span class="start-tag">tr>   span class="start-tag">td>   span class="start-tag">label>Ounces:</label>   </td>   span class="start-tag">td>   span class="start-tag">input type="number" name="in_o" id="ounce">   </td>   </tr>   </table>   span class="start-tag">div id="grams"></div>   span class="start-tag">input type="reset" name="reset" value="Reset Form">   span class="start-tag">p>You can press Reset Button for another conversion</p>   </form>   </body>   </html```

Views: 238

Attachments:

Replies to This Discussion

good news about assignment is submit date is extended to 15-01-2018