Skip to content

Instantly share code, notes, and snippets.

@putheakhem
Last active November 21, 2017 08:27
Show Gist options
  • Save putheakhem/615a8f2b141b5ed7c7a0243244932d8a to your computer and use it in GitHub Desktop.
Save putheakhem/615a8f2b141b5ed7c7a0243244932d8a to your computer and use it in GitHub Desktop.
Here is a sample html file with a submit button. Now modify the style of the paragraph text through javascript code
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS DOM paragraph style</title>
</head>
<body>
<p id ='text'>JavaScript Exercises - by Mr Khem Puthea</p>
<div>
<button id="jsStyle"
onclick="js_style()">Style</button>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment