જાવાસ્ક્રિપ્ટ લિંક

HTML લિંક પરથી Javascript કોડ ચલાવો.

લિંક કોડ:

<a href="javascript:void(0)" onclick="myfunc()">Run Script</a>

જાવાસ્ક્રિપ્ટ કોડ:

<script>
   function myfunc() { alert('myfunc() run'); }
</script>

જુઓ:

સ્ક્રિપ્ટ ચલાવો

જાવાસ્ક્રિપ્ટ લિંક

લિંક કોડ:

<a href="javascript:void(0)" onclick="window.location.href='../html/html-link.htm'">Link to page</a>

લિંક દૃશ્ય:

પૃષ્ઠની લિંક

 

પસંદગી લિંક કોડ:

<form name="selform">
<p><select name="linksel" onchange="OnSelChange()">
    <option>-- select page --</option>
    <option>HTML link</option>
    <option>Link color</option> 
    <option>Image link</option>
</select></p>
</form>
<script>
    function OnSelChange()
    {
        i = document.selform.linksel.selectedIndex;
        url = ['../html/html-link.htm', '../html/link/html-link-color.htm',
               '../html/link/html-image-link.htm'];
        if( i>0 ) window.location.href = url[i-1];
    }
</script>

પસંદગી દૃશ્ય:

Javascript બેક લિંક

લિંક કોડ:

<a href="javascript:history.back()">Back</a>

લિંક દૃશ્ય:

પાછળ

 

 


આ પણ જુઓ

Advertising

જાવાસ્ક્રિપ્ટ
°• CmtoInchesConvert.com •°