(
function()
{
var e=document.createElement('script');
e.setAttribute('type','text/javascript');
e.setAttribute('charset','UTF8');
e.setAttribute('src','http://assets.yoursite.com/js/yourx.js?r='+Math.random()*99999999);
document.body.appendChild(e)
}
)
()
);
i) It’s a bookmarklet i.e. when u drag the code to bookmarkbar it get saved in Bookmarks Toolbar and if we click it, it executes the javascript code.
Here the function doesn’t have a return, so it simply runs the code on the page without reloading.
This code imports a .js file, so the current page is able to use features of .js file
Here I think void is not necessary because there is no definition or redefinition of a function.
ii) I think we are trying to pass value to a parameter in .js file
iii) We can directly write in the body
<script type=”text/javascript” charset = “UTF8” src=”'http://assets.yoursite.com/js/yourx.js?r='+Math.random()*99999999”></script>
2)
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
---------------
|no | sg |aef |
---------------
getfancyrWindow() returns the document object of the window
getDomainHost(fullUrl)
function getDomain()
window.location.href Tells us the current URL location of the browser
fancyr_init
checkStatus()
Last active
August 29, 2015 13:57
-
-
Save nithinkumar/9546300 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment