Skip to main content

Posts

Basic HTML Interview Questions

Here are some basic interview questions related to HTML that can help you prepare: What is HTML? HTML (HyperText Markup Language) is the standard language used to create and design web pages and web applications. What is the basic structure of an HTML document? Explain the roles of <!DOCTYPE html>, <html>, <head>, <title>, and <body> tags. Mention that the <head> contains meta-information (not displayed) and the <body> contains the visible content. What are HTML elements and tags? HTML elements are building blocks of HTML pages. Tags are used to mark the beginning and end of an HTML element, enclosed in angle brackets, such as <tagname> and </tagname>.   What is the difference between <div> and <span>? <div>: A block-level element used to group other elements for styling purposes or layout. <span>: An inline element used to group text or other inline elements for styling. What are the key HTML5 features?...

Dynamically adding option to the dropdown list instenly using text box | How to Show/Hide text box when select Other from dropdown list

JavaScript Code: $(document).on('click','.btcl', function(){     var dataString = 'Rule=comp_list';     $.ajax({         type: "POST",         url: "ajax.php",         data: dataString,         cache: false,         success: function(data){             $("#company_list").html(data);         }     }); }); $(document).on('change','#enq_company', function(e){        var t=e.target.type;     //var val = $('#enq_company option:selected').val();     var val = $(this).val();         if(val=="new" || t=="text") {         var dataString = 'val='+val+'&Rule=ins_comp';         ...

Using single jQuery Ajax function/Call to load child dropdown based on Parent dropdown selction instead of multiple functions

Using single jQuery Ajax function/Call to load child drop down based on Parent drop down selection instead of multiple functions. <script type="text/javascript"> $(document).ready( function() {         // All in On RNS Ajax Call     $('.rnscall').on('change', function(){                var val = $(this).find('option:selected').val();         var rnsid=this.id;         if(rnsid=="proj_city_id") {             var dataString = 'city_id='+val+'&drop=loc'; var rnsresult="#proj_loc_id";         } else if(rnsid=="proj_type") {             var dataString = 'type_id='+val+'&drop=subtype'; var rnsresult="#proj_subtype";         }         $.a...