Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>Some Title</title>
<script type="text/javascript">
function platformChange(el){
thisID = el.id;
//I'm assuming that you may have wanted to pull the numbers out of the id also:
var pattern = /^SWFUpload_(\d+)_(\d+)$/;
var match = thisID.match(pattern);
var arr = (match !== null) ? match : ['match', 'was', 'null'];
alert(arr.join('\n'));
}
</script>
</head>
<body>
<div>
<button type="button" id="SWFUpload_10_0" onclick="platformChange(this);">Click Me</button>
</div>
</body>
</html>
Bookmarks