Skip to content

Instantly share code, notes, and snippets.

@hideack
Created August 10, 2020 12:35
Show Gist options
  • Select an option

  • Save hideack/d4926a10aa04c3fdea866a8606982dc5 to your computer and use it in GitHub Desktop.

Select an option

Save hideack/d4926a10aa04c3fdea866a8606982dc5 to your computer and use it in GitHub Desktop.
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=EUC-JP" />
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript">
//<![CDATA[
function addItem(){
$('area1').innerHTML = "<div id='add1'>加えられました</div>";
}
function changeStyle(){
var link=document.createElement('LINK');
link.rel="stylesheet";
link.type="text/css";
link.href="addstyle.css";
var head=document.getElementsByTagName('HEAD').item(0);
head.appendChild(link);
}
//]]>
</script>
</head>
<body>
<div id="area1"></div>
<br>
<input type="button" value="要素を加える" onclick="addItem();"><br>
<input type="button" value="スタイルを変える" onclick="changeStyle();"><br>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment