Question: Can u do a code like this in java ? HTML Document Your browser does not support the audio element. -------------------------------------------------------------------------------------- css: * { margin:

Can u do a code like this in java ? HTML

Document

Your browser does not support the audio element.

--------------------------------------------------------------------------------------

css:

* {

margin: 0;

padding: 0;

}

body {

background: #cccccc;

}

#cow {

position: absolute;

width: 50px;

height: 50px;

background: #cccccc;

}

---------------------------------------------------------------

script:

$().ready(function() {

var docHeight = $(document).height(),

docWidth = $(document).width(),

$div = $('#cow'),

divWidth = $div.width(),

divHeight = $div.height(),

heightMax = docHeight - divHeight,

widthMax = docWidth - divWidth;

$div.css({

left: Math.floor(Math.random() * widthMax),

top: Math.floor(Math.random() * heightMax)

});

$('#cow').click(showcow);

});

function showcow() {

$('#cow').html("");

$('#cow').html("")

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!