This works I hacked up this source: http://jsfiddle.net/8e9ku79p/
<html>
<head>
<script type='text/javascript'>
window.onload=function(){
var processForm = function () {
var value = document.getElementById('p_search').value;
var html = '*' + value + '*';
document.getElementById('p_search').value = html;
};
document.getElementById('submit').addEventListener('click', function () {
processForm();
}, false);
}
</script>
</head>
<body>
<form name="naics" action="http://www.osha.gov/pls/imis/sicsearch.html" method="get">Input:
<input id="p_search" type="text" name="p_search" value="">
<input class="btn" type="submit" value="Submit" id="submit">
</form>
</body>
</html>
|