Sometimes it can make you questioned that to get value and to assign value of a DIV using jQuery can be performed by only one function and that is- $("#ElementID").val() With the same code as above we can assign value for this element in jquery.. $("#ElementID").val("The Value") the difference is to give argument in jquery val() function or not. But remember my last code will only assign value inside jquery operation. But text inside that element will not be changed.
Tag: JavaScript
Since long days I was looking for a perfect system to track clicked link in my company website and at last I made the solution. Basically it’s easy to track click with the help of Google Analytics, jQuery or simple javascript. My solution has given below- The last portion of the above code is the solution to track all <a> tag’s href value which will be clicked. it’s the mechanism of Google Analytics Event tracking feature. I have tested it …
To start writing JavaScript in your HTML page, it’s really easy. Just start to write <script type=”text/javascript”> and make a end of this javascript code snippet by </script> closing tag. Try to have a look as following and open your notepad and start writing HTML page with the following little bit JavaScript code snippet. <html> <body> <script type=”text/javascript”> document.write(“Hello World!”); </script> </body> </html>
[adsense_id=”4″] JavaScript is a scripting programming language most commonly used to add interactive features to webpages. JavaScript is not it’s official name. The official name of JavaScript is ECMAScript. It is developed and maintained by ECMA Organization. Sample JavaScript code <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head><title>simple page</title></head> <body> <script type="text/javascript"> document.write('Hello World!'); </script> <noscript> <p>Your browser either does not support JavaScript, or you have JavaScript turned off.</p> </noscript> </body> </html> [adsense_id="2"]