/    Sign up×
Community /Pin to ProfileBookmark

WordPress Help

Hi everyone,

I’ve been trying a calculation for a website and thanks to user “simplypixie” i’ve solved my problem.
But i have a new problem. This javascript code does not function in WordPress. Here is the code;


—————

<html>
<body
<p> Say&#305; Yaz&#305;n </p>
<p><input id=”sayi” type=”text”></p>
<p>S&#305;n&#305;f&#305;n&#305; Belirleyin</p>
<form>
<input type=”radio” name=”sinif” id=”az” value=”az”> Az
<br>
<input type=”radio” name=”sinif” id=”normal” value=”normal”> Normal
<br>
<input type=”radio” name=”sinif” id=”cok” value=”cok”> Çok
</form>
<button type=”button” onclick=”saatbul()”>Hesapla</button>
<p id=”sure”></p>
<script>
function saatbul()
{
var x=document.getElementById(“sayi”).value;
var y;

if (document.getElementById(‘az’).checked)
{
y=x*0.5;
}
else if (document.getElementById(‘normal’).checked)
{
y=x*
0.75;
}
else
{
y=x*0.95;
}
document.getElementById(“sure”).innerHTML=y + ;
}
</script>
</body>

</html>
—————-

Could you help me about that?

[code=html][/code]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @alperemir spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.13,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...