html - Javascript - Manipulating certain checkpoints with differnet names from url -


i have website checkboxes in html:

<input onclick="markaschanged(this); toggleapprovedeny(this);" name="2c9923914b887d47014c9b30b1bb37a1_approvechk" type="checkbox">  <input onclick="markaschanged(this); toggleapprovedeny(this);" name="2c9923914b887d47014c9b30b1bb37a1_denychk" type="checkbox">  <input onclick="markaschanged(this); toggleapprovedeny(this);" name="2c9923914b887d47014c9b8b4f0337df_approvechk" type="checkbox">  <input onclick="markaschanged(this); toggleapprovedeny(this);" name="2c9923914b887d47014c9b8b4f0337df_denychk" type="checkbox"> 

i need line/script 'check' boxes '_approvechk' , leave others unchecked. there way in url "javascript:alert();" style? or way call javascript script stored locally through url?

is there way in url "javascript:alert();" style? yes wouldn't recommend it. since asked though:

javascript:(function(){ var l=document.getelementsbytagname('input'); for(var i=0; i<l.length; i++) if((''+l[i].name).indexof('_approvechk')) l[i].checked=true })() 

this not recommend way of doing sort of thing , if want include on lots of links bear in mind may increase size of webpage.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -